这个target里面没有xml文件,我在mapper目录下有个StudentMapper.xml文件
现在去访问显示
2021-05-26 12:38:32.421 ERROR 15712 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): cn.dwg.mapper.StudentMapper.selectByPrimaryKey] with root cause
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): cn.dwg.mapper.StudentMapper.selectByPrimaryKey
at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:235) ~[mybatis-3.5.6.jar:3.5.6]
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:53) ~[mybatis-3.5.6.jar:3.5.6]
at org.apache.ibatis.binding.MapperProxy.lambda$cachedInvoker$0(MapperProxy.java:115) ~[mybatis-3.5.6.jar:3.5.6]
然后我去pom里面加了resource
clean之后再运行xml文件有了,但又报了这个错误
说已经存在了,我@mapper@controller什么的都加好的,时区也设置的没问题,这边不加没xml文件加了又说重复实在把我搞晕了,希望有大佬可以指点一下