Skip to content
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

sqlSessionFactory has been removed in spring? Mybatis cannot be used in spring boot 3.0.0 #29445

Closed
tangtaoshadow opened this issue Nov 8, 2022 · 1 comment
Labels
for: external-project Needs a fix in external project

Comments

@tangtaoshadow
Copy link

Affects: <6.0.0>


springBootVersion "3.0.0-SNAPSHOT"

mybatis-spring-boot-starter version: '2.2.2'

sqlSessionFactory has been removed in spring? Mybatis cannot be used in spring boot 3.0.0

Caused by: java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
	at org.springframework.util.Assert.notNull(Assert.java:201)
	at org.mybatis.spring.support.SqlSessionDaoSupport.checkDaoConfig(SqlSessionDaoSupport.java:122)
	at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:73)
	at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1799)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1749)
	... 72 more
new SqlSessionFactoryBean()

cause 
java.lang.ClassNotFoundException: org.springframework.core.NestedIOException
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 8, 2022
@snicoll
Copy link
Member

snicoll commented Nov 8, 2022

Thanks for the report but there's nothing we can do. MyBatis should upgrade to Spring Framework 6. This was reported previously and I've requested to create an issue in MyBatis if one doesn't already exist.

@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2022
@snicoll snicoll added for: external-project Needs a fix in external project and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project Needs a fix in external project
Projects
None yet
Development

No branches or pull requests

3 participants