🎨 代码优化

This commit is contained in:
ronger 2022-08-27 22:15:41 +08:00
parent 4ee0aaacd4
commit 00a4c4bf70
3 changed files with 8 additions and 5 deletions

View File

@ -40,12 +40,11 @@ public class MybatisConfigurer {
pageHelper.setProperties(properties);
//添加插件
factory.setPlugins(new Interceptor[]{pageHelper});
factory.setPlugins(pageHelper);
//添加XML目录
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
factory.setMapperLocations(resolver.getResources("classpath:mapper/**/*.xml"));
// factory.setTypeHandlersPackage("com.rymcu.forest.util.handlers");
return factory.getObject();
}

View File

@ -1,5 +1,6 @@
package com.rymcu.forest.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.persistence.Column;
@ -21,13 +22,15 @@ public class ForestFile {
@Id
@GeneratedValue(generator = "JDBC")
@Column(name = "id")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;
/**
* 文件大小
*/
@Column(name = "file_size")
private long fileSize;
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long fileSize;
/**
* 文件类型-文件后缀
@ -68,7 +71,8 @@ public class ForestFile {
* 创建人
*/
@Column(name = "created_by")
private long createdBy;
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long createdBy;
}

View File

@ -4,7 +4,7 @@ spring:
thymeleaf:
prefix: classpath:/templates/
suffix: .html
mode: LEGACYHTML5
mode: HTML
encoding: UTF-8
servlet:
content-type: text/html