From 4953d5ec62ed5b82c1453497c1a615d1f9ded869 Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 14 Jun 2023 16:24:10 +0800 Subject: [PATCH 1/4] fix: vben codegen radio type --- .../src/main/resources/codegen/vue3_vben/views/data.ts.vm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm index 0724d5c57..6f0c01d80 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm @@ -122,7 +122,7 @@ export const createFormSchema: FormSchema[] = [ #end } #elseif($column.htmlType == "radio")## 单选框 - component: 'Radio', + component: 'RadioButtonGroup', componentProps: { #if ("" != $dictType)## 有数据字典 options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') @@ -188,7 +188,7 @@ export const updateFormSchema: FormSchema[] = [ #end } #elseif($column.htmlType == "radio")## 单选框 - component: 'Radio', + component: 'RadioButtonGroup', componentProps: { #if ("" != $dictType)## 有数据字典 options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') From cd33f68e2badbf3149577f8a4317a55bec2fea26 Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 14 Jun 2023 16:50:46 +0800 Subject: [PATCH 2/4] chore: up springboot 2.10.12 --- README.md | 2 +- pom.xml | 2 +- yudao-dependencies/pom.xml | 2 +- yudao-example/yudao-sso-demo-by-code/pom.xml | 2 +- .../yudao-sso-demo-by-password/pom.xml | 2 +- yudao-server/pom.xml | 2 +- .../src/main/resources/application-local.yaml | 22 +++++++++---------- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 4feb387d2..e2eb27acd 100644 --- a/README.md +++ b/README.md @@ -249,7 +249,7 @@ ps:核心功能已经实现,正在对接微信小程序中... | 框架 | 说明 | 版本 | 学习指南 | |---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------| -| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.11 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | +| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.12 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | | [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | | | [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.16 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) | diff --git a/pom.xml b/pom.xml index dcaa35c12..4f1350a10 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ 3.8.1 1.18.26 - 2.7.11 + 2.7.12 1.5.5.Final UTF-8 diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index b34b01f63..46020dc58 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -16,7 +16,7 @@ 1.7.3-snapshot - 2.7.11 + 2.7.12 1.6.15 4.1.0 diff --git a/yudao-example/yudao-sso-demo-by-code/pom.xml b/yudao-example/yudao-sso-demo-by-code/pom.xml index e49b573a2..d3f745dba 100644 --- a/yudao-example/yudao-sso-demo-by-code/pom.xml +++ b/yudao-example/yudao-sso-demo-by-code/pom.xml @@ -21,7 +21,7 @@ 8 UTF-8 - 2.7.11 + 2.7.12 diff --git a/yudao-example/yudao-sso-demo-by-password/pom.xml b/yudao-example/yudao-sso-demo-by-password/pom.xml index 556d2b6c3..d6e73916d 100644 --- a/yudao-example/yudao-sso-demo-by-password/pom.xml +++ b/yudao-example/yudao-sso-demo-by-password/pom.xml @@ -21,7 +21,7 @@ 8 UTF-8 - 2.7.11 + 2.7.12 diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index 143642226..fdfa88415 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -111,7 +111,7 @@ org.springframework.boot spring-boot-maven-plugin - 2.7.11 + 2.7.12 true diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index cdc1d3fde..a06bcdd6c 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -44,34 +44,34 @@ spring: primary: master datasource: master: - name: ruoyi-vue-pro - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro-dev + url: jdbc:mysql://192.168.0.11:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例 - username: root - password: 123456 + username: dev + password: Dev@sd123 # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W slave: # 模拟从库,可根据自己需要修改 - name: ruoyi-vue-pro - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro-dev + url: jdbc:mysql://192.168.0.11:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例 - username: root - password: 123456 + username: dev + password: Dev@sd123 # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: - host: 127.0.0.1 # 地址 + host: 192.168.0.11 # 地址 port: 6379 # 端口 - database: 0 # 数据库索引 -# password: dev # 密码,建议生产环境开启 + database: 9 # 数据库索引 +# password: MyNewPass@123 # 密码,建议生产环境开启 --- #################### 定时任务相关配置 #################### From 25df1e2ecd9f55e04eb71a2907f24166580e9a3e Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 14 Jun 2023 17:58:51 +0800 Subject: [PATCH 3/4] revert: config --- .../src/main/resources/application-local.yaml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index a06bcdd6c..cdc1d3fde 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -44,34 +44,34 @@ spring: primary: master datasource: master: - name: ruoyi-vue-pro-dev - url: jdbc:mysql://192.168.0.11:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro + url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例 - username: dev - password: Dev@sd123 + username: root + password: 123456 # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W slave: # 模拟从库,可根据自己需要修改 - name: ruoyi-vue-pro-dev - url: jdbc:mysql://192.168.0.11:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro + url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例 - username: dev - password: Dev@sd123 + username: root + password: 123456 # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: - host: 192.168.0.11 # 地址 + host: 127.0.0.1 # 地址 port: 6379 # 端口 - database: 9 # 数据库索引 -# password: MyNewPass@123 # 密码,建议生产环境开启 + database: 0 # 数据库索引 +# password: dev # 密码,建议生产环境开启 --- #################### 定时任务相关配置 #################### From b892a6d2bd21fbd54863880b557922e445202ab7 Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 14 Jun 2023 18:00:14 +0800 Subject: [PATCH 4/4] feat: captcha-plus 1.0.4 --- yudao-dependencies/pom.xml | 4 ++-- .../config/YudaoCaptchaConfiguration.java | 16 ++++++++++++++-- .../core/service/RedisCaptchaServiceImpl.java | 4 ++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 46020dc58..dad575867 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -43,7 +43,7 @@ 6.8.0 - 1.0.2 + 1.0.4 1.15.4 1.18.26 1.5.5.Final @@ -67,7 +67,7 @@ 8.5.2 4.6.3 2.2.1 - 3.1.715 + 3.1.758 1.4.0 1.5.6 2.12.2 diff --git a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java index 2a690d800..32d2b4b87 100644 --- a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/config/YudaoCaptchaConfiguration.java @@ -3,11 +3,15 @@ package cn.iocoder.yudao.framework.captcha.config; import cn.hutool.core.util.ClassUtil; import cn.iocoder.yudao.framework.captcha.core.enums.CaptchaRedisKeyConstants; import cn.iocoder.yudao.framework.captcha.core.service.RedisCaptchaServiceImpl; +import com.xingyuv.captcha.properties.AjCaptchaProperties; import com.xingyuv.captcha.service.CaptchaCacheService; +import com.xingyuv.captcha.service.impl.CaptchaServiceFactory; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.data.redis.core.StringRedisTemplate; +import javax.annotation.Resource; + @AutoConfiguration public class YudaoCaptchaConfiguration { @@ -17,9 +21,17 @@ public class YudaoCaptchaConfiguration { ClassUtil.loadClass(CaptchaRedisKeyConstants.class.getName()); } + @Resource + private StringRedisTemplate stringRedisTemplate; + @Bean - public CaptchaCacheService captchaCacheService(StringRedisTemplate stringRedisTemplate) { - return new RedisCaptchaServiceImpl(stringRedisTemplate); + public CaptchaCacheService captchaCacheService(AjCaptchaProperties config) { + //缓存类型redis/local/.... + CaptchaCacheService ret = CaptchaServiceFactory.getCache(config.getCacheType().name()); + if(ret instanceof RedisCaptchaServiceImpl){ + ((RedisCaptchaServiceImpl)ret).setStringRedisTemplate(stringRedisTemplate); + } + return ret; } } diff --git a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/core/service/RedisCaptchaServiceImpl.java b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/core/service/RedisCaptchaServiceImpl.java index 1429c47c2..95c9ec4af 100644 --- a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/core/service/RedisCaptchaServiceImpl.java +++ b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/cn/iocoder/yudao/framework/captcha/core/service/RedisCaptchaServiceImpl.java @@ -25,6 +25,10 @@ public class RedisCaptchaServiceImpl implements CaptchaCacheService { return "redis"; } + public void setStringRedisTemplate(StringRedisTemplate stringRedisTemplate) { + this.stringRedisTemplate = stringRedisTemplate; + } + @Override public void set(String key, String value, long expiresInSeconds) { stringRedisTemplate.opsForValue().set(key, value, expiresInSeconds, TimeUnit.SECONDS);