mybatis spring mvc application, getting Invalid bound statement (not found)

后端 未结 17 2286
猫巷女王i
猫巷女王i 2020-12-09 17:04

this is my first mybatis spring mvc application using spring 3.2.4, mybatis-spring-1.2.1

When i try to call my webservice i get the error::

org.spri         


        
17条回答
  •  失恋的感觉
    2020-12-09 17:23

    I resolved the same problem with a variant of the solution of Giovanni Perea(thank you). I have the .xml mapper files in the same folder with .java mapper files and I using maven with maven-resources-plugin.

    In my solution I have add an execution in maven-resources-plugin for copy all the .xml mapper file to the correct location(same folder of the .class mapper files):

    
        copy-mappers-xml
        validate
        
            copy-resources
        
        
            ${project.build.directory}/classes/com/myapplication/mapper
                      
                
                    ${project.basedir}/src/main/java/com/myapplication/mapper/
                    false
                    
                        *.xml
                    
                
                          
         
    
    

    More examples with maven-resources-plugin: Including and excluding files and directories

    If you do not use maven-resources-plugin see: https://stackoverflow.com/a/12446666/2473158

提交回复
热议问题