-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spring boot maven package war to tomcat mybatis/springbootstarter 1.1.1 start error #93
Comments
If you use auto configure for <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</dependency> Please try this. Thanks. |
@kazuki43zoo |
No. This behavior depends on a IDE or build plugin implementation. For example )
Probably, Eclipse and Spring Boot maven plugin import the <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<scope>provided</scope>
</dependency> |
Please contribute !! |
You can scan Mapper interfaces that not annotate the // ...
@MapperScan("testboot.service")
public class Main extends SpringBootServletInitializer {
// ...
} |
I create project with spring boot 1.4.0 and mybatis/spring-boot-starter 1.1.1.
The demo project in https://github.com/walkwolf/testboot
Any help thanks!
@Autowired problem
I find @Autowired SqlSessionFactory factory; then get mapper is no problem.
Use @Autowired Mapper is error.
In other words, Mapper not exist in spring context.
I trace the problem ,then find MybatisAutoConfiguration
When package war file with maven pom,then copy tomcat webapp directory,start tomcat, I got error below
The text was updated successfully, but these errors were encountered: