MyBatis绑定错误:Invalid bound statement (not found)

原文转载:https://my.oschina.net/wangdaoliang/blog/652266

 

今天搭建springMVC+spring+mybatis maven项目,总是出现

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误,调试了好久都没解决问题,新手的心酸也只有新手才能体会了。最后我去target目录下看了下,发现自己写的mapper.xml,原来maven项目的约定配置文件必须放resources里,src目录下的xml文件默认不会编译到target。由于我把mapper.xml放在了src目录里,才导致了错误的发生,该问题的实质是,idea对classpath的规定。在eclipse中,把资源文件放在src文件夹下,是可以找到的;但是在idea中,直接把资源文件放在src文件夹下,如果不进行设置,是不能被找到的。

     原来Maven 为我们提供了一致的项目目录配置(源文件夹、资源文件夹等),在自动构建项目时, Maven 会按照这个配置来执行操作(编译源文件、拷贝资源文件),Maven 默认的源文件夹及资源文件夹的配置代码如下:

<build>  
   <sourceDirectory>src/main/java</sourceDirectory >  
   <testSourceDirectory>src/test/java</testSourceDirectory >  
   <resources>  
       <resource>  
          <directory>src/main/resources</directory>  
       </resource>  
   </resources>  
   <testResources>  
       <testResource>  
          <directory>src/test/resources</directory>  
       </testResource>  
   </testResources>  
</build>

解决方案有2种:

1、可以把xml文件放到resource目录下,这样项目构建的时候会加载到target。

2、在pom.xml文件build添加resource资源列表。

<!--这个元素描述了项目相关的所有资源路径列表,例如和项目相关的属性文件,这些资源被包含在最终的打包文件里。-->
<resources>
    <resource>
        <!--   描述存放资源的目录,该路径相对POM路径-->
        <directory>src/main/java</directory>
        <includes>
            <include>**/*.xml</include>
        </includes>
    </resource>
</resources>

 

总结

如果出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误,一般的原因是Mapper interface和xml文件的定义对应不上,需要检查包名,namespace,函数名称等能否对应上,需要比较细致的对比,按以下步骤一一执行:

1、检查xml文件所在的package名称是否和interface对应的package名称一一对应

2、检查xml文件的namespace是否和xml文件的package名称一一对应

3、检查函数名称能否对应上

4、去掉xml文件中的中文注释

5、随意在xml文件中加一个空格或者空行然后保存

除此之外,我遇到的还有一些特殊情况,耽误了我不少时间,网上有其他原因也导致bound找不到:

1、Intellij Idea 的包名和目录名生成机制,新建一个包a.b.c.d,目录结构不是a->b->c->d,而是生成"a.b.c.d"的目录,进而导致mybatis映射错误,此错误很难排查。

2、xml文件定义如下:

<select id="countMembers" parameterMap="java.util.Map" resultType="java.lang.Integer">

parameterMap用错,应该为parameterType,此错误会导致mybatis所有的mapper都报绑定错误,很坑。

感觉mybatis的异常机制做的不是太好,给排错造成很大困难,仅此记录。

阅读更多

关于mybatis Invalid bound statement (not found) 问题

06-26

初学mybatis 现在系统是spring + mybatis rnapplicationContext.xml里面配置了Mapper 自动扫描rnrnrn rnrnrn然后定义了一个userMapper,里面就只有一个方法rnrn@Repository(value="userMapper")rnpublic interface UserMapper rn public List getAll();rnrnrn下面是userMapper.xmlrnrn rn select * from userrn rnrnrn下面是mybatis 配置文件rnrnrn rn rn rn rn rn rn rn rn rnrnrn我业务层定义了一个接口 UserService 然后 下面是实现类rnrn@Component(value="userServiceImpl")rn@Transactionalrnpublic class UserServiceImpl implements UserServicern rn private UserMapper userMapper;rn @Autowiredrn public void setUserMapper(UserMapper userMapper) rn this.userMapper = userMapper;rn rnrn public List getAll() rn return userMapper.getAll();rn rnrnrnrn我spring 配置文件加载完成后运行下面的代码可以获取结果rnUserServiceImpl userServiceImpl = (UserServiceImpl)PlatformContext.getApplicationContext().getBean("userServiceImpl");rnList lista = userServiceImpl.getAll();rnrn但是我现在又写了一个类 叫UserComponent 如下:rn@Component(value="userComponent")rnpublic class UserComponent rn private UserService userService;rn @Autowiredrn public void setUserService(UserService userService) rn this.userService = userService;rn rn public List getAll(Head head)rn return userService.getAll();rn rnrnrn我这个UserService直接注入了rnUserComponent userComponent = (UserComponent)PlatformContext.getApplicationContext().getBean("userComponent");rnList list = userComponent.getAll();rnrn我像这样调用的时候就不行了,只是多加了一层啊,这是为啥,求解!rnrn[b]下面是异常信息:[/b]rn[b]org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.yolly.platform.user.service.UserService.getAll[/b]rn at org.apache.ibatis.binding.MapperMethod$SqlCommand.(MapperMethod.java:178)rn at org.apache.ibatis.binding.MapperMethod.(MapperMethod.java:38)rn at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:49)rn at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:42)rn at $Proxy12.getAll(Unknown Source)rn at com.yolly.platform.user.component.UserComponent.getAll(UserComponent.java:25)rn at com.yolly.core.main.Server$ServerHandler.messageReceived(Server.java:101)rn at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:690)rn at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)rn at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)rn at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)rn at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:74)rn at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)rn at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:769)rn at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:761)rn at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:703)rn at java.lang.Thread.run(Thread.java:662)rn[b]Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.yolly.platform.user.service.UserService.getAll[/b]rn at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:775)rn at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:615)rn at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:608)rn at org.apache.ibatis.binding.MapperMethod$SqlCommand.(MapperMethod.java:176)rn ... 16 morernrnrnrnrnrnrn

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

01-07

问题如下:rn[org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver] - Resolving exception from handler [public java.lang.String com.cn.hnust.controller.UserController.toIndex(java.lang.String,java.lang.String,org.springframework.ui.Model)]: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.cn.hnust.dao.UserMapper.insertSelectivern[org.springframework.web.servlet.DispatcherServlet] - Could not complete requestrnorg.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.cn.hnust.dao.UserMapper.insertSelectivern at org.apache.ibatis.binding.MapperMethod$SqlCommand.(MapperMethod.java:189)rn at org.apache.ibatis.binding.MapperMethod.(MapperMethod.java:43)rn at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:58)rn at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:51)rn at com.sun.proxy.$Proxy16.insertSelective(Unknown Source)rn at com.cn.hnust.service.impl.UserServiceImpl.insertUser(UserServiceImpl.java:25)rn at com.cn.hnust.controller.UserController.toIndex(UserController.java:34)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:497)rn at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)rn at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)rn at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:690)rn at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)rn at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)rn at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)rn at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)rn at java.lang.Thread.run(Thread.java:745)rn__________________________________________________________________________________________________rnrn利用mybatis-generator-core-1.3.2自动生成UserMapper,UserMapper.xml,User文件rnrn源码这里粘贴长度不允许,传至github,maven下的工程结构很简单,希望各位大大能够帮忙看一下,弄了很久一直没弄好spring-mybatis的一个问题。rnhttps://github.com/Bonsen/Spring-SpringMVC-mybatis

mybatis错误Invalid bound statement (not found)万分感谢!

12-15

0.问题说明:n我是一名菜鸟,最近使用spring-mvc ,spring,mybatis框架n这两天出现一个错误一直搞不定,心好累,恳请前辈帮帮忙n1. 异常n```n org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.misscandy.inter.UserMapper.findAllUsersn org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)n org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)n javax.servlet.http.HttpServlet.service(HttpServlet.java:647)n org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)n javax.servlet.http.HttpServlet.service(HttpServlet.java:728)n org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)n org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)n org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)n```nnn n n2.我的配置文件n n```n n n n n nn n n n n n n```n3.接口nUserMapper.javannn```n package com.misscandy.inter;nnimport java.util.Vector;nnimport com.misscandy.entity.User;nimport com.misscandy.mapper.Mapper;nnn@Mappernpublic interface UserMapper n void addUser(User user);n //void deleteUser(User user);n //void updateDept(User user);n User findUserByName(String userName);n Vector findAllUsers();n //List> findValue();n //List findValues();nnn```nn4.UserMapper.xmlnnn```n nn nnn n n n n n n n n n n nn n n select user_id,user_name,image_src,age,sex,type from users where user_name = #userNamen n nn n n select user_id,user_name,age,sex,type from usersn n nn n n insert into users n (user_name,password,sex,age,type)n valuesn (#userName,#password,#sex,#age,1)n n nnnnn```nnn

mybatis错误Invalid bound statement (not found) 万分感谢!

12-15

0.问题说明:rn我是一名菜鸟,最近使用spring-mvc ,spring,mybatis框架rn这两天出现一个错误一直搞不定,心好累,恳请前辈帮帮忙rn1. 异常rn```rn org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.misscandy.inter.UserMapper.findAllUsersrn org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)rn org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:647)rn org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:728)rn org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)rn org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)rn org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)rn```rnrnrn rn rn2.我的配置文件rn rn```rn rn rn rn rn rnrn rn rn rn rn rn rn```rn3.接口rnUserMapper.javarnrnrn```rn package com.misscandy.inter;rnrnimport java.util.Vector;rnrnimport com.misscandy.entity.User;rnimport com.misscandy.mapper.Mapper;rnrnrn@Mapperrnpublic interface UserMapper rn void addUser(User user);rn //void deleteUser(User user);rn //void updateDept(User user);rn User findUserByName(String userName);rn Vector findAllUsers();rn //List> findValue();rn //List findValues();rnrnrn```rnrn4.UserMapper.xmlrnrnrn```rn rnrn rnrnrn rn rn rn rn rn rn rn rn rn rn rnrn rn rn select user_id,user_name,image_src,age,sex,type from users where user_name = #userNamern rn rnrn rn rn select user_id,user_name,age,sex,type from usersrn rn rnrn rn rn insert into users rn (user_name,password,sex,age,type)rn valuesrn (#userName,#password,#sex,#age,1)rn rn rnrnrnrnrn```rnrnrnrn

mybatis+spring-boot出现Invalid bound statement (not found):问题

04-29

初学mybatis+spring-boot整合,报错如下:rn[code=java]org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.nx.zhjf.mapper.UserMapper.findUserByUsernamern [/code]rn我的代码结构如下:rn[img=http://img.bbs.csdn.net/upload/201704/29/1493469852_659574.png][/img][img=http://img.bbs.csdn.net/upload/201704/29/1493469861_915777.png][/img]rnapplication.ym配置文件如下:[code=java]rnspring:rn datasource:rn driver-class-name:org.postgresql.Driverrn url:jdbc:postgresql://localhost:5432/nxrn username:postgresrn password:postgresrn# schema:classpath:import.sqlrn tomcat:rn max-active:30rn max-wait:1000rn max-idle:20rn remove-abandoned-timeout:180rnmybatis:rn config-location:classpath:mybatis-config.xmlrnrn[/code]rnrnUserMapper.xml如下:rn[code=html]rnrnrnrn rn insert into t_user(username,age) values(#userName,jdbcType=VARCHAR,#age,jdbcType=NUMERIC)rn rnrn rn select * from t_user where id = #id,jdbcType=NUMERICrn rnrn rn update t_user setrn username = #userName,jdbcType=VARCHAR ,rn age = #age,jdbcType=NUMERICrn where id = #id,jdbcType=NUMERICrn rnrn rn delete from t_user where id = #id,jdbcType=NUMERICrn rnrn rn rn select * from t_user where username LIKE #patternrn rnrn rn SELECT COUNT(*) FROM t_userrn rnrn rn select * from t_userrn rnrnrnrn[/code]rnUserMapper.java如下:rn[code=java]rn@Mapperrnpublic interface UserMapper rn int save(User user);rnrn User selectById(Integer id);rnrn int updateById(User user);rnrn int deleteById(Integer id);rnrn List findUserByUsername(String username);rnrn int count();rnrn List queryAll();rnrn[/code]rnrn请大神帮我看下,哪里出问题了。rnrnrnrn

SpringMVC +Mybatis 一个问题 Invalid bound statement (not found):

04-24

SpringMVC 和Mybatis 集成 出现了一个问题,搜索了半天也没有解决;rnrnrnConsole 输出的错误:rn严重: Servlet.service() for servlet spring threw exceptionrnorg.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.test.www.dao.MainEntityMapper.selectByPrimaryKeyrn at org.apache.ibatis.binding.MapperMethod$SqlCommand.(MapperMethod.java:184)rn at org.apache.ibatis.binding.MapperMethod.(MapperMethod.java:38)rn at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:49)rn at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:42)rn at $Proxy12.selectByPrimaryKey(Unknown Source)rn at com.test.www.service.impl.MainEntityServiceImpl.selectByPrimaryKey(MainEntityServiceImpl.java:24)rn at com.test.www.controller.MyTestController.sayHello(MyTestController.java:24)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)rn at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)rn at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)rn at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)rn at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)rn at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)rn at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)rn at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)rn at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)rn at java.lang.Thread.run(Thread.java:619)rnrn只跑SpringMVC是没有问题的,和 Mybatis 数据库结合就出问题了:rnrnSpring的 配置文件:ApplicationContext.xml 的内容:rnrn rn rn rn rn classpath:database.properties rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrnrnrn rnrn目录结构:rn[img=http://img.bbs.csdn.net/upload/201704/24/1493001264_147346.png][/img]rnrn不知道问题出在哪了,困扰了好几天了。

没有更多推荐了,返回首页