jdbc will not be managed by Spring Closing non transactional SqlSession

JDBC Connection [HikariProxyConnection@499226168 wrapping com.mysql.cj.jdbc.ConnectionImpl@2ec7dcd3] will not be managed by Spring ==> Preparing: SELECT id,username,password,name,phone,head_url,dept_id,post_id,description,open_id,status,create_time,update_time,is_deleted FROM sys_user WHERE is_deleted=0 AND (username = ?) ==> Parameters: admin(String) <== Columns: id, username, password, name, phone, head_url, dept_id, post_id, description, open_id, status, create_time, update_time, is_deleted <== Row: 1, admin, 96e79218965eb72c92a549dd5a330112, admin, 15000000000, http://r61cnlsfq.hn-bkt.clouddn.com/7daa4595-dfde-45da-8513-c5c2b81d20cc, 1022, null, null, , 1, 2021-05-31 18:08:43, 2022-12-13 14:52:31, 0 <== Total: 1 Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@239e95d3] org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1055) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) at javax.servlet.http.HttpServlet.service(HttpServlet.java:652) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.Appli

控制台报了这个错误,具体解决方法为引入以下依赖(建议在application启动类所在模块下的pom文件中引入)


    javax.xml.bind
    jaxb-api
    2.3.1

该问题主要是缺少jaxb依赖,花了两个小时解决了,感觉帮到自己的朋友留个赞吧!

你可能感兴趣的:(spring,java,后端)