首先创建一个BaseModel,自动生成创建时间和更新时间 @SuppressWarnings("serial") @MappedSuperclass public class BaseModel implements Serializable{ @Temporal(TemporalType.TIMESTAMP) @Column(insertable=false, updatable=false) @CreationTimestamp protected Date createTime
1,添加配置类 @Configuration @EnableSwagger2 @Profile({"default", "dev-online", "test"}) public class SwaggerConfiguration { @Bean public Docket appDoc() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(appApiInfo()) .dire