mybatis / spring-boot-starter

MyBatis integration with Spring Boot
Apache License 2.0
4.14k stars 1.79k forks source link

Can not find mapping #155

Closed fengzidk closed 7 years ago

fengzidk commented 7 years ago

I would like to refer to the official example to build a springboot-mybatis project,I joined mybatis-spring-boot-starter to help me configure the basics,But When my code is the same as the official example,My code can not find the mapping

kazuki43zoo commented 7 years ago

@fengzidaikun Please post a your question to the mailing list or Stackoverflow. A GiHub issue manages only a bug report and a feature request.

And ... I think your explanation is not enough. Please provide more detail explanation and simple reproduce project.

Thanks.

fengzidk commented 7 years ago

springboot.txt Please change the suffix to .rar ,Where the success folder is based on the official example of the reduced project

fengzidk commented 7 years ago

@kazuki43zoo

kazuki43zoo commented 7 years ago

Please move HotelMapper.xml to src/main/resource/twobug/fiction/mapper directory as follow:

.
├── pom.xml
└── src
    └── main
        ├── java
        │   └── twobug
        │       └── fiction
        │           ├── SampleXmlApplication.java
        │           ├── domain
        │           │   └── Hotel.java
        │           └── mapper
        │               └── HotelMapper.java
        ├── resources
        │   ├── application.yml
        │   └── twobug
        │       └── fiction
        │           └── mapper
        │               └── HotelMapper.xml // ### Here
        └── webapp
            ├── WEB-INF
            │   └── web.xml
            └── index.jsp

Please post a your question to the mailing list or Stackoverflow at next time.

Thanks.