spring-projects / spring-boot

Spring Boot
https://spring.io/projects/spring-boot
Apache License 2.0
74.91k stars 40.62k forks source link

Provide auto-configuration for MyBatis #3008

Closed hixuym closed 8 years ago

wilkinsona commented 9 years ago

That's very unlikely, at least without some more information. What project would it be a starter for?

hixuym commented 9 years ago

Hi, wilkinsona. Thanks for your reply. I want starter for project use spring-boot and reuse data access module that implement by mybatis. But I can't found spring-boot-starter for mybatis, can you tell me why it's very unlikely, because mybatis is too niche or any other consider?

wilkinsona commented 9 years ago

It was very unlikely as you didn't provide a description for your request. You've provided a little information now, although more would still help.

A Spring Boot starter is just a group of dependencies pulled together into a single easy-to-use dependency. The interesting piece is really in the auto-configuration. I know very little about MyBatis. Perhaps you can describe how you typically configure MyBatis in your Spring applications, and help us to identify pieces that Spring Boot could configure for you automatically.

hixuym commented 9 years ago

Good title, thanks. Typically configure Mybatis for spring project please see doc at http://mybatis.github.io/spring/getting-started.html. After auto-configuration, just write mapper XML file and mapper interface,then autoscan mappers. Mapper interface method can have @Transactional annotation enabled just like spring-data-jpa's repository interface.

eddumelendez commented 9 years ago

Mybatis's spring adapter is currently supporting version 3.2.13.RELEASE and there are no releases since Jan 18, 2014.

eddumelendez commented 9 years ago

June 15 was launched a new released of mybatis-spring. I would like to see supported by spring-boot also. +1

philwebb commented 9 years ago

See also https://github.com/joshlong/mybatis-boot from @joshlong

eddumelendez commented 9 years ago

Thanks @philwebb @joshlong

Mybatis team have created mybatis-spring-boot repository. I will take a look in order to add some improvements. PRs are welcome in that projects :)

wilkinsona commented 8 years ago

Closing in favour of the Spring Boot support that's part of the MyBatis project