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