com.blr19c.common.mybatisWrapper.MybatisWrapperAutoConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common Show documentation
Show all versions of common Show documentation
The blr19c-common library contains utility classes, Map/Stream implementation, sending enterprise
WeChat, IP/ip address acquisition, mybatis-plus separation implementation, and so on.
package com.blr19c.common.mybatisWrapper;
import com.blr19c.common.mybatisWrapper.wrapper.SqlSessionTemplateWrapper;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
@Configuration
public class MybatisWrapperAutoConfig {
@Bean
@ConditionalOnBean(SqlSessionFactory.class)
@Primary
public SqlSessionTemplateWrapper sqlSessionTemplateWrapper(SqlSessionFactory sqlSessionFactory) {
return new SqlSessionTemplateWrapper(sqlSessionFactory);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy