You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
575 B
Java
27 lines
575 B
Java
2 years ago
|
package com.supervision.config;
|
||
|
|
||
|
// Copyright (c) 2022 All project authors. All rights reserved.
|
||
|
//
|
||
|
// This source code is licensed under Apache 2.0 License.
|
||
|
|
||
|
import org.nebula.contrib.ngbatis.PkGenerator;
|
||
|
import org.springframework.context.annotation.Bean;
|
||
|
import org.springframework.context.annotation.Configuration;
|
||
|
|
||
|
/**
|
||
|
* 主键生成样例
|
||
|
*
|
||
|
* @author yeweicheng
|
||
|
* @since 2022-06-14 12:32
|
||
|
* <br>Now is history!
|
||
|
*/
|
||
|
@Configuration
|
||
|
public class PkGeneratorConfig {
|
||
|
|
||
|
@Bean
|
||
|
public PkGenerator pkGenerator() {
|
||
|
return new SnowflakePKGenerator();
|
||
|
}
|
||
|
|
||
|
}
|