修改配置
This commit is contained in:
parent
fac44c3411
commit
dbfb51ce71
|
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.config.GlobalConfig;
|
|||
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
|
||||
import com.chinaweal.youfool.framework.springboot.mybatis.plus.CommonMetaObjectHandler;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
|
|
@ -25,9 +24,9 @@ public class PrjDataSource {
|
|||
@Resource
|
||||
private CommonMetaObjectHandler commonMetaObjectHandler;
|
||||
|
||||
@Bean(name = "prjSqlSessionFactory")
|
||||
@Bean(name = "sqlSessionFactory")
|
||||
@Primary
|
||||
public MybatisSqlSessionFactoryBean sqlSessionFactory(@Qualifier("prjDS") DataSource dataSource) throws Exception {
|
||||
public MybatisSqlSessionFactoryBean sqlSessionFactory(DataSource dataSource) throws Exception {
|
||||
MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
|
||||
bean.setDataSource(dataSource);
|
||||
GlobalConfig globalConfig = new GlobalConfig();
|
||||
|
|
|
|||
|
|
@ -62,3 +62,7 @@ knife4j:
|
|||
# enable: true
|
||||
# username: admin
|
||||
# password: 123456
|
||||
|
||||
server:
|
||||
servlet:
|
||||
context-path: /prj
|
||||
|
|
|
|||
Loading…
Reference in New Issue