From 187e568ead819060651c94876dee297d2f0ffff3 Mon Sep 17 00:00:00 2001 From: linfso Date: Sun, 12 May 2024 10:42:05 +0800 Subject: [PATCH] md --- .../src/main/java/com/xdadan/erp/LaunchApplication.java | 3 +++ emis-server/src/main/resources/application_local.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/emis-server/src/main/java/com/xdadan/erp/LaunchApplication.java b/emis-server/src/main/java/com/xdadan/erp/LaunchApplication.java index b33c2c6..af62e8b 100644 --- a/emis-server/src/main/java/com/xdadan/erp/LaunchApplication.java +++ b/emis-server/src/main/java/com/xdadan/erp/LaunchApplication.java @@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; +import org.springframework.cache.annotation.EnableCaching; import org.springframework.scheduling.annotation.EnableScheduling; import java.io.File; @@ -16,6 +17,8 @@ import java.io.File; * @author xdadan */ @EnableScheduling +// 开启缓存 +@EnableCaching @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) public class LaunchApplication extends SpringBootServletInitializer { diff --git a/emis-server/src/main/resources/application_local.yml b/emis-server/src/main/resources/application_local.yml index 30690b1..6eb6d22 100644 --- a/emis-server/src/main/resources/application_local.yml +++ b/emis-server/src/main/resources/application_local.yml @@ -89,6 +89,9 @@ mybatis-plus: type-aliases-package: com.xdadan.**.domain mapper-locations: classpath*:mapper/**/*Mapper.xml config-location: classpath:mybatis/mybatis-config.xml + configuration: + cache-enabled: true + map-underscore-to-camel-case: true global-config: #主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID"; id-type: 1