db.properties中的配置如下:
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc\:mysql\://localhost\:3306/mydb?useUnicode\=true&characterEncoding\=UTF-8&zeroDateTimeBehavior\=convertToNull
jdbc.username=root
jdbc.password=root
jsp文件配置如下:
My JSP 'table.jsp' starting page
学生id
学生名称
学生性别
学生年龄
电话号码
${StudentsPo.id}
${StudentsPo.name}
${StudentsPo.sex}
${StudentsPo.age}
${StudentsPo.tel}
告警如下:
DEBUG [http-nio-8080-exec-14] - DispatcherServlet with name 'springmvc' processing POST request for [/HelloWorld/queryStudentsPo.action]
DEBUG [http-nio-8080-exec-14] - Looking up handler method for path /queryStudentsPo.action
DEBUG [http-nio-8080-exec-14] - Did not find handler method for [/queryStudentsPo.action]
WARN [http-nio-8080-exec-14] - No mapping found for HTTP request with URI [/HelloWorld/queryStudentsPo.action] in DispatcherServlet with name 'springmvc'
DEBUG [http-nio-8080-exec-14] - Successfully completed request
DEBUG [http-nio-8080-exec-14] - Returning cached instance of singleton bean 'sqlSessionFactory'
jar包完全一样
jdk我是1.8,他是1.6
然后我用的eclipse的mars,他用的myeclipse
运行之后,完全不读取数据库,我把端口号和数据库名删了依旧报这个错,在别的电脑上可以运行,实在不知道哪块出了问题,求大神解决
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
Url映射有问题,看那个warn
SpringMVC 中的Controller 类及方法上的注解没写对。
queryStudentsPo.action是不是GET方式请求的啊??日志很明显说没有定义方法....jdk的版本也有好大的关系的.不要像玩一样,喜欢什么版本就用什么版本.