From b68471e67d9d07fbfbb25fa947e6e5d077858805 Mon Sep 17 00:00:00 2001 From: fuhouyu Date: Fri, 1 Nov 2024 20:26:17 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20readme=20feat:=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=B1=BB=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 32 ++++++++++++------- .../cache/CacheAutoConfiguration.java | 2 +- ...n.java => CaffeineCacheConfiguration.java} | 2 +- ...tion.java => RedisCacheConfiguration.java} | 2 +- ...tion.java => DefaultKmsConfiguration.java} | 2 +- .../framework/kms/KmsAutoConfiguration.java | 2 +- ...on.java => OpenPlatformConfiguration.java} | 2 +- .../security/SecurityAutoConfiguration.java | 2 +- .../framework/security/RefreshTokenTest.java | 4 +-- .../security/Sm3PasswordEncoderTest.java | 4 +-- .../framework/security/TokenStoreTest.java | 4 +-- ...figuration.java => FormConfiguration.java} | 2 +- .../framework/web/WebAutoConfiguration.java | 2 +- 13 files changed, 35 insertions(+), 27 deletions(-) rename base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/{CaffeineCacheAutoconfiguration.java => CaffeineCacheConfiguration.java} (98%) rename base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/{RedisCacheAutoConfiguration.java => RedisCacheConfiguration.java} (98%) rename base-framework-kms-starter/src/main/java/com/fuhouyu/framework/kms/{DefaultKmsAutoConfiguration.java => DefaultKmsConfiguration.java} (99%) rename base-framework-security-starter/src/main/java/com/fuhouyu/framework/security/{OpenPlatformAutoConfiguration.java => OpenPlatformConfiguration.java} (95%) rename base-framework-web-starter/src/main/java/com/fuhouyu/framework/web/{FormAutoConfiguration.java => FormConfiguration.java} (96%) diff --git a/README.md b/README.md index d6fde13..fc16656 100644 --- a/README.md +++ b/README.md @@ -3,20 +3,28 @@ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=fuhouyu_base-framework&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=fuhouyu_base-framework) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=fuhouyu_base-framework&metric=bugs&branch=develop)](https://sonarcloud.io/summary/new_code?id=fuhouyu_base-framework&branch=develop) [![codecov](https://codecov.io/github/fuhouyu/base-framework/graph/badge.svg?token=VUT9BFMLK9)](https://codecov.io/github/fuhouyu/base-framework) + [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) -------- +---- + +----- ### 简介 -| 模块名 | 描述 | -| :-----------------------------: | :-----------------------------------: | -| base-framework-cache-starter | 缓存抽象,Reids、Caffeine的实现 | -| base-framework-common | 公共组件,常用工具类等 | -| base-framework-context | 上下文组件,目前只仅用户上下文 | -| base-framework-dependencies | 内部模块组件版本定义 | -| Base-framework-log-starter | 日志组件,logback和业务日志切面 | -| base-framework-resource-starter | 资源组件 | -| base-framework-security-starter | 安全认证组件,用户认证,token存储等 | -| base-framework-web-starter | web相关组件,常用拦截器,用户信息解析 | -| base-framework-kms-starter | 对称非对称加解密组件 | +| 模块名 | 描述 | +|:------------------------------------------------------------------:|:-------------------------:| +| [base-framework-cache-starter](base-framework-cache-starter) | 缓存Starter,caffine及redis实现 | +| [base-framework-common](base-framework-common) | 公共组件,常用工具类 | +| [base-framework-context](base-framework-context) | 上下文组件,用户、请求定义 | +| [base-framework-dependencies](base-framework-dependencies) | 内部模块组件 | +| [base-framework-log-starter](base-framework-log-starter) | 日志组件,logback和业务日志切面 | +| [base-framework-resource-starter](base-framework-resource-starter) | 资源组件,本地、阿里云实现 | +| [base-framework-security-starter](base-framework-security-starter) | 安全认证组件,security封装 | +| [base-framework-web-starter](base-framework-web-starter) | web组件,常用拦截器 | +| [base-framework-kms-starter](base-framework-kms-starter) | 对称非对称加解密组件 | + +---- + + + diff --git a/base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/CacheAutoConfiguration.java b/base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/CacheAutoConfiguration.java index 9bb1651..1f12fb5 100644 --- a/base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/CacheAutoConfiguration.java +++ b/base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/CacheAutoConfiguration.java @@ -30,7 +30,7 @@ * @since 2024/8/13 21:00 */ @Configuration -@Import({RedisCacheAutoConfiguration.class, CaffeineCacheAutoconfiguration.class}) +@Import({RedisCacheConfiguration.class, CaffeineCacheConfiguration.class}) @EnableConfigurationProperties(CacheProperties.class) public class CacheAutoConfiguration { diff --git a/base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/CaffeineCacheAutoconfiguration.java b/base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/CaffeineCacheConfiguration.java similarity index 98% rename from base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/CaffeineCacheAutoconfiguration.java rename to base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/CaffeineCacheConfiguration.java index 865499a..ee5eafb 100644 --- a/base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/CaffeineCacheAutoconfiguration.java +++ b/base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/CaffeineCacheConfiguration.java @@ -40,7 +40,7 @@ @ConditionalOnProperty(prefix = CacheServiceProperties.PREFIX, name = "cache-service-type", havingValue = "caffeine") -public class CaffeineCacheAutoconfiguration { +public class CaffeineCacheConfiguration { @Bean @Primary diff --git a/base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/RedisCacheAutoConfiguration.java b/base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/RedisCacheConfiguration.java similarity index 98% rename from base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/RedisCacheAutoConfiguration.java rename to base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/RedisCacheConfiguration.java index 4d26928..c667034 100644 --- a/base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/RedisCacheAutoConfiguration.java +++ b/base-framework-cache-starter/src/main/java/com/fuhouyu/framework/cache/RedisCacheConfiguration.java @@ -49,7 +49,7 @@ havingValue = "redis") @AutoConfigureAfter(RedisAutoConfiguration.class) @Configuration -public class RedisCacheAutoConfiguration { +public class RedisCacheConfiguration { @Bean diff --git a/base-framework-kms-starter/src/main/java/com/fuhouyu/framework/kms/DefaultKmsAutoConfiguration.java b/base-framework-kms-starter/src/main/java/com/fuhouyu/framework/kms/DefaultKmsConfiguration.java similarity index 99% rename from base-framework-kms-starter/src/main/java/com/fuhouyu/framework/kms/DefaultKmsAutoConfiguration.java rename to base-framework-kms-starter/src/main/java/com/fuhouyu/framework/kms/DefaultKmsConfiguration.java index e4f068a..04e10f8 100644 --- a/base-framework-kms-starter/src/main/java/com/fuhouyu/framework/kms/DefaultKmsAutoConfiguration.java +++ b/base-framework-kms-starter/src/main/java/com/fuhouyu/framework/kms/DefaultKmsConfiguration.java @@ -60,7 +60,7 @@ @EnableConfigurationProperties(KmsDefaultProperties.class) @RequiredArgsConstructor @Configuration -public class DefaultKmsAutoConfiguration { +public class DefaultKmsConfiguration { private final KmsDefaultProperties properties; diff --git a/base-framework-kms-starter/src/main/java/com/fuhouyu/framework/kms/KmsAutoConfiguration.java b/base-framework-kms-starter/src/main/java/com/fuhouyu/framework/kms/KmsAutoConfiguration.java index 2972e62..851dd5a 100644 --- a/base-framework-kms-starter/src/main/java/com/fuhouyu/framework/kms/KmsAutoConfiguration.java +++ b/base-framework-kms-starter/src/main/java/com/fuhouyu/framework/kms/KmsAutoConfiguration.java @@ -27,7 +27,7 @@ * @author fuhouyu * @since 2024/8/17 17:27 */ -@Import({DefaultKmsAutoConfiguration.class}) +@Import({DefaultKmsConfiguration.class}) @Configuration public class KmsAutoConfiguration { diff --git a/base-framework-security-starter/src/main/java/com/fuhouyu/framework/security/OpenPlatformAutoConfiguration.java b/base-framework-security-starter/src/main/java/com/fuhouyu/framework/security/OpenPlatformConfiguration.java similarity index 95% rename from base-framework-security-starter/src/main/java/com/fuhouyu/framework/security/OpenPlatformAutoConfiguration.java rename to base-framework-security-starter/src/main/java/com/fuhouyu/framework/security/OpenPlatformConfiguration.java index a80b313..bc50d83 100644 --- a/base-framework-security-starter/src/main/java/com/fuhouyu/framework/security/OpenPlatformAutoConfiguration.java +++ b/base-framework-security-starter/src/main/java/com/fuhouyu/framework/security/OpenPlatformConfiguration.java @@ -30,7 +30,7 @@ */ @Configuration @EnableConfigurationProperties(OpenPlatformAuthProperties.class) -public class OpenPlatformAutoConfiguration { +public class OpenPlatformConfiguration { } diff --git a/base-framework-security-starter/src/main/java/com/fuhouyu/framework/security/SecurityAutoConfiguration.java b/base-framework-security-starter/src/main/java/com/fuhouyu/framework/security/SecurityAutoConfiguration.java index 45ab311..3d4711b 100644 --- a/base-framework-security-starter/src/main/java/com/fuhouyu/framework/security/SecurityAutoConfiguration.java +++ b/base-framework-security-starter/src/main/java/com/fuhouyu/framework/security/SecurityAutoConfiguration.java @@ -45,7 +45,7 @@ * @since 2024/8/15 16:22 */ @Configuration -@Import({OpenPlatformAutoConfiguration.class}) +@Import({OpenPlatformConfiguration.class}) @AutoConfigureAfter(CacheAutoConfiguration.class) public class SecurityAutoConfiguration { diff --git a/base-framework-security-starter/src/test/java/com/fuhouyu/framework/security/RefreshTokenTest.java b/base-framework-security-starter/src/test/java/com/fuhouyu/framework/security/RefreshTokenTest.java index 467f12b..c1cc2cf 100644 --- a/base-framework-security-starter/src/test/java/com/fuhouyu/framework/security/RefreshTokenTest.java +++ b/base-framework-security-starter/src/test/java/com/fuhouyu/framework/security/RefreshTokenTest.java @@ -16,7 +16,7 @@ package com.fuhouyu.framework.security; import com.fuhouyu.framework.cache.CacheAutoConfiguration; -import com.fuhouyu.framework.cache.CaffeineCacheAutoconfiguration; +import com.fuhouyu.framework.cache.CaffeineCacheConfiguration; import com.fuhouyu.framework.security.core.GrantTypeAuthenticationTokenEnum; import com.fuhouyu.framework.security.entity.TokenEntity; import com.fuhouyu.framework.security.token.TokenStore; @@ -43,7 +43,7 @@ */ @SpringBootTest(classes = { CacheAutoConfiguration.class, - CaffeineCacheAutoconfiguration.class, + CaffeineCacheConfiguration.class, SecurityAutoConfiguration.class, BaseComponent.class }) diff --git a/base-framework-security-starter/src/test/java/com/fuhouyu/framework/security/Sm3PasswordEncoderTest.java b/base-framework-security-starter/src/test/java/com/fuhouyu/framework/security/Sm3PasswordEncoderTest.java index 90b7175..04441ab 100644 --- a/base-framework-security-starter/src/test/java/com/fuhouyu/framework/security/Sm3PasswordEncoderTest.java +++ b/base-framework-security-starter/src/test/java/com/fuhouyu/framework/security/Sm3PasswordEncoderTest.java @@ -17,7 +17,7 @@ package com.fuhouyu.framework.security; import com.fuhouyu.framework.cache.CacheAutoConfiguration; -import com.fuhouyu.framework.cache.CaffeineCacheAutoconfiguration; +import com.fuhouyu.framework.cache.CaffeineCacheConfiguration; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -35,7 +35,7 @@ */ @SpringBootTest(classes = { CacheAutoConfiguration.class, - CaffeineCacheAutoconfiguration.class, + CaffeineCacheConfiguration.class, SecurityAutoConfiguration.class, BaseComponent.class }) diff --git a/base-framework-security-starter/src/test/java/com/fuhouyu/framework/security/TokenStoreTest.java b/base-framework-security-starter/src/test/java/com/fuhouyu/framework/security/TokenStoreTest.java index d2e9472..f14a5e9 100644 --- a/base-framework-security-starter/src/test/java/com/fuhouyu/framework/security/TokenStoreTest.java +++ b/base-framework-security-starter/src/test/java/com/fuhouyu/framework/security/TokenStoreTest.java @@ -17,7 +17,7 @@ package com.fuhouyu.framework.security; import com.fuhouyu.framework.cache.CacheAutoConfiguration; -import com.fuhouyu.framework.cache.CaffeineCacheAutoconfiguration; +import com.fuhouyu.framework.cache.CaffeineCacheConfiguration; import com.fuhouyu.framework.cache.service.CacheService; import com.fuhouyu.framework.security.entity.TokenEntity; import com.fuhouyu.framework.security.token.TokenStore; @@ -44,7 +44,7 @@ */ @SpringBootTest(classes = { CacheAutoConfiguration.class, - CaffeineCacheAutoconfiguration.class, + CaffeineCacheConfiguration.class, SecurityAutoConfiguration.class, BaseComponent.class }) diff --git a/base-framework-web-starter/src/main/java/com/fuhouyu/framework/web/FormAutoConfiguration.java b/base-framework-web-starter/src/main/java/com/fuhouyu/framework/web/FormConfiguration.java similarity index 96% rename from base-framework-web-starter/src/main/java/com/fuhouyu/framework/web/FormAutoConfiguration.java rename to base-framework-web-starter/src/main/java/com/fuhouyu/framework/web/FormConfiguration.java index acd5349..183f325 100644 --- a/base-framework-web-starter/src/main/java/com/fuhouyu/framework/web/FormAutoConfiguration.java +++ b/base-framework-web-starter/src/main/java/com/fuhouyu/framework/web/FormConfiguration.java @@ -30,7 +30,7 @@ * @since 2024/8/17 23:07 */ @RequiredArgsConstructor -public class FormAutoConfiguration { +public class FormConfiguration { private final CacheService cacheService; diff --git a/base-framework-web-starter/src/main/java/com/fuhouyu/framework/web/WebAutoConfiguration.java b/base-framework-web-starter/src/main/java/com/fuhouyu/framework/web/WebAutoConfiguration.java index 9e7d80a..4251e31 100644 --- a/base-framework-web-starter/src/main/java/com/fuhouyu/framework/web/WebAutoConfiguration.java +++ b/base-framework-web-starter/src/main/java/com/fuhouyu/framework/web/WebAutoConfiguration.java @@ -42,7 +42,7 @@ * @author fuhouyu * @since 2024/8/15 20:18 */ -@Import({WebMvcAutoConfiguration.class, FormAutoConfiguration.class}) +@Import({WebMvcConfiguration.class, FormConfiguration.class}) @ComponentScan(basePackageClasses = WebAutoConfiguration.class) @ConfigurationPropertiesScan(basePackages = "com.fuhouyu.framework.web.properties") public class WebAutoConfiguration {