From e39cbcbeddb2793e088173eee937a9898f6bfb20 Mon Sep 17 00:00:00 2001 From: jetlag <1141394646@qq.com> Date: Mon, 12 Sep 2022 00:48:09 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=E5=B1=9E=E6=80=A7=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=BB=9F=E4=B8=80=E9=85=8D=E7=BD=AE=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mdd/admin/LikeAdminApplication.java | 2 +- .../com/mdd/admin/config/AdminConfig.java | 3 ++- .../com/mdd/admin/config/WebMvcConfig.java | 10 +++++-- ...itional-spring-configuration-metadata.json | 7 ++++- .../resources/application-example-pro.yml | 7 ++--- .../plugin/storage/engine/LocalStorage.java | 9 +++++-- .../mdd/common/properties/BaseProperties.java | 26 +++++++++++++++++++ .../mdd/common/properties/FileProperties.java | 17 ++++++++++++ .../java/com/mdd/common/utils/YmlUtil.java | 18 ++----------- .../com/mdd/front/config/WebMvcConfig.java | 10 +++++-- .../generator/controller/GenController.java | 5 ++++ 11 files changed, 86 insertions(+), 28 deletions(-) create mode 100644 server/like-common/src/main/java/com/mdd/common/properties/BaseProperties.java create mode 100644 server/like-common/src/main/java/com/mdd/common/properties/FileProperties.java diff --git a/server/like-admin/src/main/java/com/mdd/admin/LikeAdminApplication.java b/server/like-admin/src/main/java/com/mdd/admin/LikeAdminApplication.java index 6a628048..f1c359ec 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/LikeAdminApplication.java +++ b/server/like-admin/src/main/java/com/mdd/admin/LikeAdminApplication.java @@ -11,7 +11,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; /** * 启动器 */ -@Configuration +//@Configuration @ComponentScan(basePackages = {"com.mdd"}) @MapperScan(basePackages = {"com.mdd.*.mapper"}) @EnableTransactionManagement diff --git a/server/like-admin/src/main/java/com/mdd/admin/config/AdminConfig.java b/server/like-admin/src/main/java/com/mdd/admin/config/AdminConfig.java index 39856136..9fe0194b 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/config/AdminConfig.java +++ b/server/like-admin/src/main/java/com/mdd/admin/config/AdminConfig.java @@ -16,7 +16,8 @@ public class AdminConfig { // 免登录验证 public static String[] notLoginUri = new String[]{ - "system:login", // 登录接口 + "system:login", + "user:list",// 登录接口 "common:index:config" // 配置接口 }; diff --git a/server/like-admin/src/main/java/com/mdd/admin/config/WebMvcConfig.java b/server/like-admin/src/main/java/com/mdd/admin/config/WebMvcConfig.java index 3804660e..c1ce497b 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/config/WebMvcConfig.java +++ b/server/like-admin/src/main/java/com/mdd/admin/config/WebMvcConfig.java @@ -2,7 +2,10 @@ package com.mdd.admin.config; import com.mdd.admin.LikeAdminInterceptor; import com.mdd.common.config.GlobalConfig; +import com.mdd.common.properties.BaseProperties; import com.mdd.common.utils.YmlUtil; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; @@ -20,6 +23,9 @@ public class WebMvcConfig implements WebMvcConfigurer { @Resource LikeAdminInterceptor likeAdminInterceptor; + @Autowired + private BaseProperties baseProperties; + /** * 配置允许跨域 */ @@ -45,8 +51,8 @@ public class WebMvcConfig implements WebMvcConfigurer { */ @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { - String directory = YmlUtil.get("like.upload-directory"); - if (directory == null || directory.equals("")) { + String directory = baseProperties.getUpdate().getPath(); + if (StringUtils.isNotBlank(directory)) { directory = GlobalConfig.uploadDirectory; } diff --git a/server/like-admin/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/server/like-admin/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 379bbd72..8dc0e1db 100644 --- a/server/like-admin/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/server/like-admin/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -8,7 +8,12 @@ { "name": "like.production", "type": "java.lang.String", - "description": "Description for like.production." + "description": "Description for like.production11111." + }, + { + "name": "like.update.path", + "type": "java.lang.String", + "description": "系统文件上传文件路径." } ] } \ No newline at end of file diff --git a/server/like-admin/src/main/resources/application-example-pro.yml b/server/like-admin/src/main/resources/application-example-pro.yml index 90a35f74..beda1d9f 100644 --- a/server/like-admin/src/main/resources/application-example-pro.yml +++ b/server/like-admin/src/main/resources/application-example-pro.yml @@ -1,16 +1,17 @@ # 项目配置 like: - upload-directory: /www/uploads/ # 上传目录 + update: + file: /www/uploads/ # 上传目录 # 框架配置 spring: # 数据源配置 datasource: - url: jdbc:mysql://localhost:3306/【库名称】?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false + url: jdbc:mysql://localhost:3306/local_admin_java?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false type: com.zaxxer.hikari.HikariDataSource # 数据源类型 driver-class-name: com.mysql.jdbc.Driver # MySql的驱动 username: root # 数据库账号 - password: root # 数据库密码 + password: root5520127 # 数据库密码 # Redis配置 redis: host: localhost # Redis服务地址 diff --git a/server/like-common/src/main/java/com/mdd/common/plugin/storage/engine/LocalStorage.java b/server/like-common/src/main/java/com/mdd/common/plugin/storage/engine/LocalStorage.java index 20c259ca..115eb2c1 100644 --- a/server/like-common/src/main/java/com/mdd/common/plugin/storage/engine/LocalStorage.java +++ b/server/like-common/src/main/java/com/mdd/common/plugin/storage/engine/LocalStorage.java @@ -2,7 +2,11 @@ package com.mdd.common.plugin.storage.engine; import com.mdd.common.config.GlobalConfig; import com.mdd.common.exception.OperateException; +import com.mdd.common.properties.BaseProperties; +import com.mdd.common.utils.SpringUtil; import com.mdd.common.utils.YmlUtil; +import org.apache.commons.lang3.StringUtils; +import org.springframework.core.env.Environment; import org.springframework.web.multipart.MultipartFile; import java.io.File; @@ -22,8 +26,9 @@ public class LocalStorage { */ public void upload(MultipartFile multipartFile, String key, String folder) { // 映射目录 - String directory = YmlUtil.get("like.upload-directory"); - if (directory == null || directory.equals("")) { + BaseProperties properties = SpringUtil.getBean(BaseProperties.class); + String directory = properties.getUpdate().getPath(); + if (StringUtils.isNotBlank(directory)) { directory = GlobalConfig.uploadDirectory; } diff --git a/server/like-common/src/main/java/com/mdd/common/properties/BaseProperties.java b/server/like-common/src/main/java/com/mdd/common/properties/BaseProperties.java new file mode 100644 index 00000000..efea865d --- /dev/null +++ b/server/like-common/src/main/java/com/mdd/common/properties/BaseProperties.java @@ -0,0 +1,26 @@ +package com.mdd.common.properties; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * yml基础配置 + * + * @author jetlag + * @date 2022/9/12 + */ +@Data +@Configuration +@EnableConfigurationProperties +@ConfigurationProperties(prefix = BaseProperties.LIKE_ADMIN_PREFIX) +public class BaseProperties { + + static final String LIKE_ADMIN_PREFIX = "like"; + + /** + * 系统文件上传配置 + */ + private FileProperties update = new FileProperties(); +} diff --git a/server/like-common/src/main/java/com/mdd/common/properties/FileProperties.java b/server/like-common/src/main/java/com/mdd/common/properties/FileProperties.java new file mode 100644 index 00000000..d878fd32 --- /dev/null +++ b/server/like-common/src/main/java/com/mdd/common/properties/FileProperties.java @@ -0,0 +1,17 @@ +package com.mdd.common.properties; + +import lombok.Data; + +/** + * 文件配置 + * @author jetlag + * @date 2022/9/12 + */ +@Data +public class FileProperties { + + /** + * 文件上传绝对路径 + */ + private String path; +} diff --git a/server/like-common/src/main/java/com/mdd/common/utils/YmlUtil.java b/server/like-common/src/main/java/com/mdd/common/utils/YmlUtil.java index f1d24d61..89ab23e7 100644 --- a/server/like-common/src/main/java/com/mdd/common/utils/YmlUtil.java +++ b/server/like-common/src/main/java/com/mdd/common/utils/YmlUtil.java @@ -1,6 +1,5 @@ package com.mdd.common.utils; -import org.springframework.context.EnvironmentAware; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; @@ -8,20 +7,7 @@ import org.springframework.stereotype.Component; * 系统文件配置操作工具 */ @Component -public class YmlUtil implements EnvironmentAware { - - private static Environment env; - - /** - * 设置环境变量 - * - * @author fzr - * @param environment 环境变量 - */ - @Override - public void setEnvironment(Environment environment) { - YmlUtil.env = environment; - } +public class YmlUtil { /** * 根据Key获取值 @@ -31,7 +17,7 @@ public class YmlUtil implements EnvironmentAware { * @return String */ public static String get(String key) { - return env.getProperty(key); + return SpringUtil.getBean(Environment.class).getProperty(key, ""); } } diff --git a/server/like-front/src/main/java/com/mdd/front/config/WebMvcConfig.java b/server/like-front/src/main/java/com/mdd/front/config/WebMvcConfig.java index 22b3c8ba..1eb47e35 100644 --- a/server/like-front/src/main/java/com/mdd/front/config/WebMvcConfig.java +++ b/server/like-front/src/main/java/com/mdd/front/config/WebMvcConfig.java @@ -1,8 +1,11 @@ package com.mdd.front.config; import com.mdd.common.config.GlobalConfig; +import com.mdd.common.properties.BaseProperties; import com.mdd.common.utils.YmlUtil; import com.mdd.front.LikeFrontInterceptor; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.lang.NonNull; import org.springframework.web.servlet.config.annotation.CorsRegistry; @@ -18,6 +21,9 @@ public class WebMvcConfig implements WebMvcConfigurer { @Resource LikeFrontInterceptor likeFrontInterceptor; + @Autowired + private BaseProperties baseProperties; + /** * 配置允许跨域 */ @@ -43,8 +49,8 @@ public class WebMvcConfig implements WebMvcConfigurer { */ @Override public void addResourceHandlers(@NonNull ResourceHandlerRegistry registry) { - String directory = YmlUtil.get("like.upload-directory"); - if (directory == null || directory.equals("")) { + String directory = baseProperties.getUpdate().getPath(); + if (StringUtils.isNotBlank(directory)) { directory = GlobalConfig.uploadDirectory; } diff --git a/server/like-generator/src/main/java/com/mdd/generator/controller/GenController.java b/server/like-generator/src/main/java/com/mdd/generator/controller/GenController.java index e4ab0d4c..0281139b 100644 --- a/server/like-generator/src/main/java/com/mdd/generator/controller/GenController.java +++ b/server/like-generator/src/main/java/com/mdd/generator/controller/GenController.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.toolkit.Assert; import com.mdd.common.core.AjaxResult; import com.mdd.common.core.PageResult; import com.mdd.common.exception.OperateException; +import com.mdd.common.properties.BaseProperties; import com.mdd.common.utils.StringUtil; import com.mdd.common.utils.YmlUtil; import com.mdd.common.validator.annotation.IDMust; @@ -13,6 +14,7 @@ import com.mdd.generator.validate.PageParam; import com.mdd.generator.vo.DbTableVo; import com.mdd.generator.vo.GenTableVo; import org.apache.commons.io.IOUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -28,6 +30,9 @@ public class GenController { @Resource IGenerateService iGenerateService; + @Autowired + private BaseProperties baseProperties; + /** * 库列表 * -- Gitee From 839353a9495c32b7888dddff69381f260c348eb2 Mon Sep 17 00:00:00 2001 From: jetlag <1141394646@qq.com> Date: Sun, 11 Sep 2022 17:01:06 +0000 Subject: [PATCH 2/5] update server/like-admin/src/main/java/com/mdd/admin/config/AdminConfig.java. Signed-off-by: jetlag <1141394646@qq.com> --- .../src/main/java/com/mdd/admin/config/AdminConfig.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/like-admin/src/main/java/com/mdd/admin/config/AdminConfig.java b/server/like-admin/src/main/java/com/mdd/admin/config/AdminConfig.java index 9fe0194b..db410709 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/config/AdminConfig.java +++ b/server/like-admin/src/main/java/com/mdd/admin/config/AdminConfig.java @@ -16,8 +16,7 @@ public class AdminConfig { // 免登录验证 public static String[] notLoginUri = new String[]{ - "system:login", - "user:list",// 登录接口 + "system:login",// 登录接口 "common:index:config" // 配置接口 }; -- Gitee From 2c078c80b220b49e829be517fe7663d17ced8016 Mon Sep 17 00:00:00 2001 From: jetlag <1141394646@qq.com> Date: Mon, 12 Sep 2022 02:24:49 +0800 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20=E9=9B=86=E6=88=90redission?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E6=A8=A1=E5=9D=97=20=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E6=89=A9=E5=B1=95=E6=80=A7=E5=A4=9A=E4=B8=AA=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E4=B8=AD=20=E5=8D=95=E4=BD=93=E3=80=81=E9=9B=86=E7=BE=A4=20?= =?UTF-8?q?=E5=93=A8=E5=85=B5=E6=A8=A1=E5=BC=8F=20=20=E7=81=B5=E6=B4=BB?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 4 +- .../main/resources/redission/redisson-dev.yml | 14 +++++ server/like-redission/pom.xml | 39 +++++++++++++ .../redisson/RedissonAutoConfiguration.java | 56 +++++++++++++++++++ .../com/mdd/redisson/RedissonProperties.java | 24 ++++++++ .../main/resources/META-INF/spring.factories | 2 + server/pom.xml | 8 +++ 7 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 server/like-admin/src/main/resources/redission/redisson-dev.yml create mode 100644 server/like-redission/pom.xml create mode 100644 server/like-redission/src/main/java/com/mdd/redisson/RedissonAutoConfiguration.java create mode 100644 server/like-redission/src/main/java/com/mdd/redisson/RedissonProperties.java create mode 100644 server/like-redission/src/main/resources/META-INF/spring.factories diff --git a/server/like-admin/src/main/resources/application.yml b/server/like-admin/src/main/resources/application.yml index be90a50b..8d923c8d 100644 --- a/server/like-admin/src/main/resources/application.yml +++ b/server/like-admin/src/main/resources/application.yml @@ -14,11 +14,11 @@ spring: static-path-pattern: /api/static/** # 数据源配置 datasource: - url: jdbc:mysql://localhost:3306/local_admin_java?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false + url: jdbc:mysql://192.168.100.115:3306/local_admin_java?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false type: com.zaxxer.hikari.HikariDataSource # 数据源类型 driver-class-name: com.mysql.jdbc.Driver # MySql的驱动 username: root # 数据库账号 - password: root # 数据库密码 + password: root5520127 # 数据库密码 hikari: connection-timeout: 30000 # 等待连接分配连接的最大时长(毫秒),超出时长还没可用连接则发送SQLException,默认30秒 minimum-idle: 5 # 最小连接数 diff --git a/server/like-admin/src/main/resources/redission/redisson-dev.yml b/server/like-admin/src/main/resources/redission/redisson-dev.yml new file mode 100644 index 00000000..07d02953 --- /dev/null +++ b/server/like-admin/src/main/resources/redission/redisson-dev.yml @@ -0,0 +1,14 @@ +singleServerConfig: + address: "redis://127.0.0.1:6379" + # password: zhs@8003 + #连接超时,单位:毫秒 + connectTimeout: 10000 + #命令等待超时,单位:毫秒 + timeout: 3000 +codec: ! {} + +#################### 具体配置请见org.redisson.config源码进行配置可以单体、主从、集群、哨兵模式 以上为单体类型 +#### 使用方式 引用like-redission依赖 配置redission地址 +#like: +# redission: +# path: classpth:redission/redission-dev.yml \ No newline at end of file diff --git a/server/like-redission/pom.xml b/server/like-redission/pom.xml new file mode 100644 index 00000000..7e91f093 --- /dev/null +++ b/server/like-redission/pom.xml @@ -0,0 +1,39 @@ + + + + likeadmin-java + org.mdd + 1.0.0 + + 4.0.0 + + like-redission + redisson基础模块 + + + 8 + 8 + + + + + org.redisson + redisson + + + + org.springframework.boot + spring-boot-configuration-processor + true + + + + org.springframework.boot + spring-boot-starter + true + + + + \ No newline at end of file diff --git a/server/like-redission/src/main/java/com/mdd/redisson/RedissonAutoConfiguration.java b/server/like-redission/src/main/java/com/mdd/redisson/RedissonAutoConfiguration.java new file mode 100644 index 00000000..9167c940 --- /dev/null +++ b/server/like-redission/src/main/java/com/mdd/redisson/RedissonAutoConfiguration.java @@ -0,0 +1,56 @@ +package com.mdd.redisson; + +import org.redisson.Redisson; +import org.redisson.api.RedissonClient; +import org.redisson.codec.JsonJacksonCodec; +import org.redisson.config.Config; +import org.springframework.boot.autoconfigure.AutoConfigureBefore; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.Resource; + +import java.io.IOException; + +/** + * @author jetlag + * @date 2022/9/12 + **/ +@Configuration +@ConditionalOnClass(RedissonClient.class) +@AutoConfigureBefore(RedisAutoConfiguration.class) +@EnableConfigurationProperties(RedissonProperties.class) +public class RedissonAutoConfiguration { + + private RedissonProperties redissonProperties; + + private ApplicationContext applicationContext; + + public RedissonAutoConfiguration(RedissonProperties redissonProperties, + ApplicationContext applicationContext) { + this.redissonProperties = redissonProperties; + this.applicationContext = applicationContext; + } + + /** + * 加载redisson配置 + * + * @return + * @throws IOException + */ + @ConditionalOnMissingBean + @Bean(destroyMethod = "shutdown") + public RedissonClient redissonClient() throws IOException { + Resource resource = applicationContext.getResource(redissonProperties.getPath()); + Config config = Config.fromYAML(resource.getInputStream()); + if (config.getCodec() == null) { + config.setCodec(new JsonJacksonCodec()); + } + return Redisson.create(config); + } +} + diff --git a/server/like-redission/src/main/java/com/mdd/redisson/RedissonProperties.java b/server/like-redission/src/main/java/com/mdd/redisson/RedissonProperties.java new file mode 100644 index 00000000..1d9b863a --- /dev/null +++ b/server/like-redission/src/main/java/com/mdd/redisson/RedissonProperties.java @@ -0,0 +1,24 @@ +package com.mdd.redisson; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * @author jetlag + * @date 2022/9/12 + **/ +@ConfigurationProperties(prefix = "like.redisson") +public class RedissonProperties { + + /** + * redission 配置路径 + */ + private String path; + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } +} diff --git a/server/like-redission/src/main/resources/META-INF/spring.factories b/server/like-redission/src/main/resources/META-INF/spring.factories new file mode 100644 index 00000000..6941e5d7 --- /dev/null +++ b/server/like-redission/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +com.mdd.redisson.RedissonAutoConfiguration \ No newline at end of file diff --git a/server/pom.xml b/server/pom.xml index 41a30e5d..49ddc26b 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -14,6 +14,7 @@ like-front like-common like-generator + like-redission @@ -42,6 +43,7 @@ 3.10.2 4.5.16 6.1.2 + 3.12.0 @@ -163,6 +165,12 @@ like-common ${like.version} + + + org.redisson + redisson + ${redission.version} + -- Gitee From abc0d0ae52bcd7919be21f4b6b5385b0aeca09f2 Mon Sep 17 00:00:00 2001 From: jetlag <1141394646@qq.com> Date: Mon, 12 Sep 2022 02:29:05 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/like-admin/src/main/resources/application.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/like-admin/src/main/resources/application.yml b/server/like-admin/src/main/resources/application.yml index 8d923c8d..be90a50b 100644 --- a/server/like-admin/src/main/resources/application.yml +++ b/server/like-admin/src/main/resources/application.yml @@ -14,11 +14,11 @@ spring: static-path-pattern: /api/static/** # 数据源配置 datasource: - url: jdbc:mysql://192.168.100.115:3306/local_admin_java?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false + url: jdbc:mysql://localhost:3306/local_admin_java?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false type: com.zaxxer.hikari.HikariDataSource # 数据源类型 driver-class-name: com.mysql.jdbc.Driver # MySql的驱动 username: root # 数据库账号 - password: root5520127 # 数据库密码 + password: root # 数据库密码 hikari: connection-timeout: 30000 # 等待连接分配连接的最大时长(毫秒),超出时长还没可用连接则发送SQLException,默认30秒 minimum-idle: 5 # 最小连接数 -- Gitee From 19ab674ed96a21f8d1520b2e24f6a1abc86f22c6 Mon Sep 17 00:00:00 2001 From: jetlag <1141394646@qq.com> Date: Mon, 12 Sep 2022 02:54:01 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BC=98=E5=8C=96Mapper=E6=89=AB=E6=8F=8F?= =?UTF-8?q?=20=E7=A7=BB=E9=99=A4Mapper=E5=8D=95=E4=B8=80=E6=89=AB=E6=8F=8F?= =?UTF-8?q?=20=E4=BD=BF=E7=94=A8MapperScan=E5=85=A8=E5=B1=80=E6=89=AB?= =?UTF-8?q?=E6=8F=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mdd/admin/LikeAdminApplication.java | 1 - .../src/main/java/com/mdd/admin/config/WebMvcConfig.java | 3 +-- .../src/main/java/com/mdd/admin/config/aop/LogAspect.java | 2 +- .../java/com/mdd/admin/controller/common/UploadController.java | 2 +- .../com/mdd/admin/controller/system/AuthAdminController.java | 2 +- .../com/mdd/admin/controller/system/AuthMenuController.java | 2 +- .../com/mdd/admin/{ => interceptor}/LikeAdminInterceptor.java | 3 ++- .../admin/service/system/impl/SystemAuthAdminServiceImpl.java | 2 +- .../admin/service/system/impl/SystemAuthMenuServiceImpl.java | 2 +- .../java/com/mdd/admin/{ => thread}/LikeAdminThreadLocal.java | 2 +- .../src/main/java/com/mdd/common/core/basics/IBaseMapper.java | 2 +- .../main/java/com/mdd/common/mapper/album/AlbumCateMapper.java | 2 +- .../src/main/java/com/mdd/common/mapper/album/AlbumMapper.java | 2 +- .../com/mdd/common/mapper/article/ArticleCategoryMapper.java | 2 +- .../com/mdd/common/mapper/article/ArticleCollectMapper.java | 2 +- .../main/java/com/mdd/common/mapper/article/ArticleMapper.java | 2 +- .../com/mdd/common/mapper/decorate/DecoratePageMapper.java | 2 +- .../com/mdd/common/mapper/decorate/DecorateTabbarMapper.java | 2 +- .../java/com/mdd/common/mapper/notice/NoticeSettingMapper.java | 2 +- .../java/com/mdd/common/mapper/setting/DictDataMapper.java | 2 +- .../java/com/mdd/common/mapper/setting/DictTypeMapper.java | 2 +- .../java/com/mdd/common/mapper/setting/HotSearchMapper.java | 2 +- .../com/mdd/common/mapper/system/SystemAuthAdminMapper.java | 2 +- .../com/mdd/common/mapper/system/SystemAuthDeptMapper.java | 2 +- .../com/mdd/common/mapper/system/SystemAuthMenuMapper.java | 2 +- .../com/mdd/common/mapper/system/SystemAuthPermMapper.java | 2 +- .../com/mdd/common/mapper/system/SystemAuthPostMapper.java | 2 +- .../com/mdd/common/mapper/system/SystemAuthRoleMapper.java | 2 +- .../java/com/mdd/common/mapper/system/SystemConfigMapper.java | 2 +- .../com/mdd/common/mapper/system/SystemLogLoginMapper.java | 2 +- .../com/mdd/common/mapper/system/SystemLogOperateMapper.java | 2 +- .../java/com/mdd/common/mapper/system/SystemLogSmsMapper.java | 2 +- .../main/java/com/mdd/common/mapper/user/UserAuthMapper.java | 2 +- .../src/main/java/com/mdd/common/mapper/user/UserMapper.java | 2 +- .../java/com/mdd/generator/mapper/GenTableColumnMapper.java | 2 +- .../src/main/java/com/mdd/generator/mapper/GenTableMapper.java | 2 +- server/like-generator/src/main/resources/java/mapper.java.vm | 2 +- 37 files changed, 37 insertions(+), 38 deletions(-) rename server/like-admin/src/main/java/com/mdd/admin/{ => interceptor}/LikeAdminInterceptor.java (98%) rename server/like-admin/src/main/java/com/mdd/admin/{ => thread}/LikeAdminThreadLocal.java (97%) diff --git a/server/like-admin/src/main/java/com/mdd/admin/LikeAdminApplication.java b/server/like-admin/src/main/java/com/mdd/admin/LikeAdminApplication.java index f1c359ec..0fd0c4c8 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/LikeAdminApplication.java +++ b/server/like-admin/src/main/java/com/mdd/admin/LikeAdminApplication.java @@ -11,7 +11,6 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; /** * 启动器 */ -//@Configuration @ComponentScan(basePackages = {"com.mdd"}) @MapperScan(basePackages = {"com.mdd.*.mapper"}) @EnableTransactionManagement diff --git a/server/like-admin/src/main/java/com/mdd/admin/config/WebMvcConfig.java b/server/like-admin/src/main/java/com/mdd/admin/config/WebMvcConfig.java index c1ce497b..61424f27 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/config/WebMvcConfig.java +++ b/server/like-admin/src/main/java/com/mdd/admin/config/WebMvcConfig.java @@ -1,9 +1,8 @@ package com.mdd.admin.config; -import com.mdd.admin.LikeAdminInterceptor; +import com.mdd.admin.interceptor.LikeAdminInterceptor; import com.mdd.common.config.GlobalConfig; import com.mdd.common.properties.BaseProperties; -import com.mdd.common.utils.YmlUtil; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; diff --git a/server/like-admin/src/main/java/com/mdd/admin/config/aop/LogAspect.java b/server/like-admin/src/main/java/com/mdd/admin/config/aop/LogAspect.java index ffbf11ba..4a71ccdf 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/config/aop/LogAspect.java +++ b/server/like-admin/src/main/java/com/mdd/admin/config/aop/LogAspect.java @@ -1,7 +1,7 @@ package com.mdd.admin.config.aop; import com.alibaba.fastjson.JSON; -import com.mdd.admin.LikeAdminThreadLocal; +import com.mdd.admin.thread.LikeAdminThreadLocal; import com.mdd.common.entity.system.SystemLogOperate; import com.mdd.common.mapper.system.SystemLogOperateMapper; import com.mdd.common.utils.IpUtil; diff --git a/server/like-admin/src/main/java/com/mdd/admin/controller/common/UploadController.java b/server/like-admin/src/main/java/com/mdd/admin/controller/common/UploadController.java index a4444391..016febd4 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/controller/common/UploadController.java +++ b/server/like-admin/src/main/java/com/mdd/admin/controller/common/UploadController.java @@ -1,6 +1,6 @@ package com.mdd.admin.controller.common; -import com.mdd.admin.LikeAdminThreadLocal; +import com.mdd.admin.thread.LikeAdminThreadLocal; import com.mdd.admin.config.aop.Log; import com.mdd.admin.service.common.IAlbumService; import com.mdd.common.core.AjaxResult; diff --git a/server/like-admin/src/main/java/com/mdd/admin/controller/system/AuthAdminController.java b/server/like-admin/src/main/java/com/mdd/admin/controller/system/AuthAdminController.java index 33dcef34..c0c090cd 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/controller/system/AuthAdminController.java +++ b/server/like-admin/src/main/java/com/mdd/admin/controller/system/AuthAdminController.java @@ -1,6 +1,6 @@ package com.mdd.admin.controller.system; -import com.mdd.admin.LikeAdminThreadLocal; +import com.mdd.admin.thread.LikeAdminThreadLocal; import com.mdd.admin.config.aop.Log; import com.mdd.admin.service.system.ISystemAuthAdminService; import com.mdd.admin.validate.common.PageParam; diff --git a/server/like-admin/src/main/java/com/mdd/admin/controller/system/AuthMenuController.java b/server/like-admin/src/main/java/com/mdd/admin/controller/system/AuthMenuController.java index 9fa4a120..ed6bc418 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/controller/system/AuthMenuController.java +++ b/server/like-admin/src/main/java/com/mdd/admin/controller/system/AuthMenuController.java @@ -1,7 +1,7 @@ package com.mdd.admin.controller.system; import com.alibaba.fastjson.JSONArray; -import com.mdd.admin.LikeAdminThreadLocal; +import com.mdd.admin.thread.LikeAdminThreadLocal; import com.mdd.admin.config.aop.Log; import com.mdd.admin.service.system.ISystemAuthMenuService; import com.mdd.admin.validate.system.SystemAuthMenuParam; diff --git a/server/like-admin/src/main/java/com/mdd/admin/LikeAdminInterceptor.java b/server/like-admin/src/main/java/com/mdd/admin/interceptor/LikeAdminInterceptor.java similarity index 98% rename from server/like-admin/src/main/java/com/mdd/admin/LikeAdminInterceptor.java rename to server/like-admin/src/main/java/com/mdd/admin/interceptor/LikeAdminInterceptor.java index a0fa7134..2afe8dbb 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/LikeAdminInterceptor.java +++ b/server/like-admin/src/main/java/com/mdd/admin/interceptor/LikeAdminInterceptor.java @@ -1,7 +1,8 @@ -package com.mdd.admin; +package com.mdd.admin.interceptor; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.mdd.admin.thread.LikeAdminThreadLocal; import com.mdd.admin.config.AdminConfig; import com.mdd.admin.service.system.ISystemAuthAdminService; import com.mdd.admin.service.system.ISystemAuthPermService; diff --git a/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthAdminServiceImpl.java b/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthAdminServiceImpl.java index 6f0bef7e..554f505a 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthAdminServiceImpl.java +++ b/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthAdminServiceImpl.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Assert; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.yulichang.query.MPJQueryWrapper; -import com.mdd.admin.LikeAdminThreadLocal; +import com.mdd.admin.thread.LikeAdminThreadLocal; import com.mdd.admin.config.AdminConfig; import com.mdd.admin.service.system.ISystemAuthAdminService; import com.mdd.admin.service.system.ISystemAuthPermService; diff --git a/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthMenuServiceImpl.java b/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthMenuServiceImpl.java index 3d5c6dd4..fb57038d 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthMenuServiceImpl.java +++ b/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthMenuServiceImpl.java @@ -3,7 +3,7 @@ package com.mdd.admin.service.system.impl; import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Assert; -import com.mdd.admin.LikeAdminThreadLocal; +import com.mdd.admin.thread.LikeAdminThreadLocal; import com.mdd.admin.config.AdminConfig; import com.mdd.admin.service.system.ISystemAuthMenuService; import com.mdd.admin.service.system.ISystemAuthPermService; diff --git a/server/like-admin/src/main/java/com/mdd/admin/LikeAdminThreadLocal.java b/server/like-admin/src/main/java/com/mdd/admin/thread/LikeAdminThreadLocal.java similarity index 97% rename from server/like-admin/src/main/java/com/mdd/admin/LikeAdminThreadLocal.java rename to server/like-admin/src/main/java/com/mdd/admin/thread/LikeAdminThreadLocal.java index a483966e..4d50a0a6 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/LikeAdminThreadLocal.java +++ b/server/like-admin/src/main/java/com/mdd/admin/thread/LikeAdminThreadLocal.java @@ -1,4 +1,4 @@ -package com.mdd.admin; +package com.mdd.admin.thread; import java.util.LinkedHashMap; diff --git a/server/like-common/src/main/java/com/mdd/common/core/basics/IBaseMapper.java b/server/like-common/src/main/java/com/mdd/common/core/basics/IBaseMapper.java index 607cc854..314dc470 100644 --- a/server/like-common/src/main/java/com/mdd/common/core/basics/IBaseMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/core/basics/IBaseMapper.java @@ -17,7 +17,7 @@ import java.util.Map; * 基类Mapper * @param */ -@Mapper + public interface IBaseMapper extends MPJBaseMapper { /** diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/album/AlbumCateMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/album/AlbumCateMapper.java index 57553dc5..5277f675 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/album/AlbumCateMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/album/AlbumCateMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 相册分类 */ -@Mapper + public interface AlbumCateMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/album/AlbumMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/album/AlbumMapper.java index e22c262c..25a4e64a 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/album/AlbumMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/album/AlbumMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 相册 */ -@Mapper + public interface AlbumMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/article/ArticleCategoryMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/article/ArticleCategoryMapper.java index 78cf5768..e6232099 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/article/ArticleCategoryMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/article/ArticleCategoryMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 文章分类 */ -@Mapper + public interface ArticleCategoryMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/article/ArticleCollectMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/article/ArticleCollectMapper.java index e5036f53..28c1d07c 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/article/ArticleCollectMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/article/ArticleCollectMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 文章收藏Mapper */ -@Mapper + public interface ArticleCollectMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/article/ArticleMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/article/ArticleMapper.java index a84c3731..effab983 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/article/ArticleMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/article/ArticleMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 文章 */ -@Mapper + public interface ArticleMapper extends IBaseMapper
{ } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/decorate/DecoratePageMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/decorate/DecoratePageMapper.java index 9f105932..3c4bf20c 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/decorate/DecoratePageMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/decorate/DecoratePageMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 页面装修Mapper */ -@Mapper + public interface DecoratePageMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/decorate/DecorateTabbarMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/decorate/DecorateTabbarMapper.java index 454701f9..670a9d08 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/decorate/DecorateTabbarMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/decorate/DecorateTabbarMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 底部导航Mapper */ -@Mapper + public interface DecorateTabbarMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/notice/NoticeSettingMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/notice/NoticeSettingMapper.java index dde8692c..3d3f25ff 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/notice/NoticeSettingMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/notice/NoticeSettingMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 通知设置Mapper */ -@Mapper + public interface NoticeSettingMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/setting/DictDataMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/setting/DictDataMapper.java index 3113254b..938f2a4f 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/setting/DictDataMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/setting/DictDataMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 字典数据Mapper */ -@Mapper + public interface DictDataMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/setting/DictTypeMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/setting/DictTypeMapper.java index c128221c..01e934ab 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/setting/DictTypeMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/setting/DictTypeMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 字典类型Mapper */ -@Mapper + public interface DictTypeMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/setting/HotSearchMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/setting/HotSearchMapper.java index 7bc63502..7b3ffa7e 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/setting/HotSearchMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/setting/HotSearchMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 热门搜索Mapper */ -@Mapper + public interface HotSearchMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthAdminMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthAdminMapper.java index f5098658..bfd63849 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthAdminMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthAdminMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 系统管理员Mapper */ -@Mapper + public interface SystemAuthAdminMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java index 68e8dcc4..eb165d58 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 系统岗位Mapper */ -@Mapper + public interface SystemAuthDeptMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthMenuMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthMenuMapper.java index 61b7bd7b..6fdc5efc 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthMenuMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthMenuMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 系统菜单Mapper */ -@Mapper + public interface SystemAuthMenuMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthPermMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthPermMapper.java index 5f809b59..2d216517 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthPermMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthPermMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 角色菜单Mapper */ -@Mapper + public interface SystemAuthPermMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthPostMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthPostMapper.java index c52afd7a..fc6e05fd 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthPostMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthPostMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 系统岗位Mapper */ -@Mapper + public interface SystemAuthPostMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthRoleMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthRoleMapper.java index 0010f676..9d37ae2a 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthRoleMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthRoleMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 系统角色Mapper */ -@Mapper + public interface SystemAuthRoleMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemConfigMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemConfigMapper.java index 8c7746cb..23c03a7b 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemConfigMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemConfigMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 系统配置 */ -@Mapper + public interface SystemConfigMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemLogLoginMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemLogLoginMapper.java index 8b81e56f..21b02a1c 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemLogLoginMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemLogLoginMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 系统登录日志 */ -@Mapper + public interface SystemLogLoginMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemLogOperateMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemLogOperateMapper.java index 91b5b4eb..b8b04fca 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemLogOperateMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemLogOperateMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 系统操作日志 */ -@Mapper + public interface SystemLogOperateMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemLogSmsMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemLogSmsMapper.java index 21d7da4b..7f11f160 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemLogSmsMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemLogSmsMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 系统短信日志Mapper */ -@Mapper + public interface SystemLogSmsMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/user/UserAuthMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/user/UserAuthMapper.java index 49b4511c..f7ca0764 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/user/UserAuthMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/user/UserAuthMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 用户授权Mapper */ -@Mapper + public interface UserAuthMapper extends IBaseMapper { } diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/user/UserMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/user/UserMapper.java index aae977d3..f3047b33 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/user/UserMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/user/UserMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 用户Mapper */ -@Mapper + public interface UserMapper extends IBaseMapper { } diff --git a/server/like-generator/src/main/java/com/mdd/generator/mapper/GenTableColumnMapper.java b/server/like-generator/src/main/java/com/mdd/generator/mapper/GenTableColumnMapper.java index bfb867f8..a735b135 100644 --- a/server/like-generator/src/main/java/com/mdd/generator/mapper/GenTableColumnMapper.java +++ b/server/like-generator/src/main/java/com/mdd/generator/mapper/GenTableColumnMapper.java @@ -7,6 +7,6 @@ import org.apache.ibatis.annotations.Mapper; /** * 代码生成表列 */ -@Mapper + public interface GenTableColumnMapper extends IBaseMapper { } diff --git a/server/like-generator/src/main/java/com/mdd/generator/mapper/GenTableMapper.java b/server/like-generator/src/main/java/com/mdd/generator/mapper/GenTableMapper.java index 36746426..4b5f8915 100644 --- a/server/like-generator/src/main/java/com/mdd/generator/mapper/GenTableMapper.java +++ b/server/like-generator/src/main/java/com/mdd/generator/mapper/GenTableMapper.java @@ -13,7 +13,7 @@ import java.util.Map; /** * 代码生成表 */ -@Mapper + public interface GenTableMapper extends IBaseMapper { /** diff --git a/server/like-generator/src/main/resources/java/mapper.java.vm b/server/like-generator/src/main/resources/java/mapper.java.vm index 44e1701d..772ed52a 100644 --- a/server/like-generator/src/main/resources/java/mapper.java.vm +++ b/server/like-generator/src/main/resources/java/mapper.java.vm @@ -6,6 +6,6 @@ import com.mdd.common.entity.${moduleName}.${EntityName}; /** * ${functionName}Mapper */ -@Mapper + public interface ${EntityName}Mapper extends IBaseMapper<${EntityName}> { } -- Gitee