use of com.baomidou.mybatisplus.core.incrementer.IKeyGenerator in project mybatis-plus-samples by baomidou.
the class MpConfig method globalConfiguration.
@Bean
public GlobalConfig globalConfiguration() {
GlobalConfig conf = new GlobalConfig();
conf.setDbConfig(new GlobalConfig.DbConfig().setKeyGenerators(Arrays.asList(// h2 1.x 的写法(默认 2.x 的写法)
new IKeyGenerator() {
@Override
public String executeSql(String incrementerName) {
return "select " + incrementerName + ".nextval";
}
@Override
public DbType dbType() {
return DbType.POSTGRE_SQL;
}
})));
return conf;
}
use of com.baomidou.mybatisplus.core.incrementer.IKeyGenerator in project mybatis-plus-samples by baomidou.
the class DbConfigurations method globalConfiguration.
@Bean
public GlobalConfig globalConfiguration() {
GlobalConfig conf = new GlobalConfig();
conf.setDbConfig(new GlobalConfig.DbConfig().setKeyGenerators(Arrays.asList(// h2 1.x 的写法(默认 2.x 的写法)
new IKeyGenerator() {
@Override
public String executeSql(String incrementerName) {
return "select " + incrementerName + ".nextval";
}
@Override
public DbType dbType() {
return DbType.POSTGRE_SQL;
}
})));
return conf;
}
Aggregations