控制台没报任何错,点击登陆就出现
DispatcherServlet with name 'DispatcherServlet' processing POST request for [/Motorcontrol/user/login.action]
DEBUG [http-nio-8080-exec-1] - Looking up handler method for path /user/login.action
DEBUG [http-nio-8080-exec-1] - Returning handler method [public ynnu.zmf.entity.McResult ynnu.zmf.controller.UserController.login(java.lang.String,java.lang.String,java.lang.String)]
DEBUG [http-nio-8080-exec-1] - Returning cached instance of singleton bean 'userController'
DEBUG [http-nio-8080-exec-1] - Creating a new SqlSession
DEBUG [http-nio-8080-exec-1] - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3b3fe2a] was not registered for synchronization because synchronization is not active
DEBUG [http-nio-8080-exec-1] - Fetching JDBC Connection from DataSource
DEBUG [http-nio-8080-exec-1] - JDBC Connection [jdbc:mysql://localhost:3306/motorcontrol, UserName=root@, MySQL-AB JDBC Driver] will not be managed by Spring
DEBUG [http-nio-8080-exec-1] - ooo Using Connection [jdbc:mysql://localhost:3306/motorcontrol, UserName=root@, MySQL-AB JDBC Driver]
DEBUG [http-nio-8080-exec-1] - ==> Preparing: select * from user_descript where UserName=? and Password=?
DEBUG [http-nio-8080-exec-1] - ==> Parameters: 张三(String), 123456(String)
DEBUG [http-nio-8080-exec-1] - <== Total: 1
DEBUG [http-nio-8080-exec-1] - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3b3fe2a]
DEBUG [http-nio-8080-exec-1] - Returning JDBC Connection to DataSource
INFO [http-nio-8080-exec-1] - CHECK_ENCODING:9190
INFO [http-nio-8080-exec-1] - client_code:9190
DEBUG [http-nio-8080-exec-1] - Rendering view [org.springframework.web.servlet.view.JstlView: name 'user/login'; URL [/jsp/user/login.jsp]] in DispatcherServlet with name 'DispatcherServlet'
DEBUG [http-nio-8080-exec-1] - Added model object 'mcResult' of type [ynnu.zmf.entity.McResult] to request in view with name 'user/login'
DEBUG [http-nio-8080-exec-1] - Added model object 'org.springframework.validation.BindingResult.mcResult' of type [org.springframework.validation.BeanPropertyBindingResult] to request in view with name 'user/login'
DEBUG [http-nio-8080-exec-1] - Forwarding to resource [/jsp/user/login.jsp] in InternalResourceView 'user/login'
DEBUG [http-nio-8080-exec-1] - Successfully completed request
SpringMVC配置
<!-- 可以扫描controller、service、...-->
<context:component-scan base-package="ynnu.zmf.*"/>
<mvc:annotation-driven/>
<context:annotation-config />
<import resource="applicationContext-dao.xml" />
<import resource="applicationContext-transaction.xml"/>
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<!-- 配置jsp路径的前缀 -->
<property name="prefix" value="/jsp/"/>
<!-- 配置jsp路径的后缀 -->
<property name="suffix" value=".jsp"/>
</bean>