admin 管理员组

文章数量: 1184232


2024年6月10日发(作者:c语言scanf用法事例)

aSource(dataSource());

MybatisConfiguration configuration = new MybatisConfiguration();

UnderscoreToCamelCase(true);

aultEnumTypeHandler();

figuration(configuration);

// perLocations(resolveMapperLocations());

gins(new Interceptor[]{new PaginationInterceptor()});

return ect();

}

完整配置

package ;

import ataSource;

import sConfiguration;

import tionInterceptor;

import sSqlSessionFactoryBean;

import eptor;

import sionFactory;

import dinalTypeHandler;

import Scan;

import ;

import ;

import uration;

import AspectJAutoProxy;

import urceTransactionManager;

import urce;

/**

* @author linyong

* @date 2020/7/30 16:38

* @description 数据源配置

**/

@Configuration

@EnableAspectJAutoProxy

@MapperScan("")

public class DBConfig {

@Value("${}")

private String url;

@Value("${-class-name}")

private String driverClassName;

@Value("${me}")

private String username;

@Value("${rd}")

private String password;

@Value("${lSize:5}")

private Integer initialSize;

@Value("${ive:50}")

private Integer maxActive;

@Value("${t:60000}")

private Integer maxWait;

@Value("${e:5}")

private Integer minIdle;

@Value("${ileIdle:true}")

private Boolean testWhileIdle;

@Value("${Borrow:true}")

private Boolean testOnBorrow;

@Value("${Return:true}")

private Boolean testOnReturn;

@Value("${tionQuery:select 1}")


本文标签: 语言 配置 数据源 用法 事例