From 2a1f2b6bb932b72913ee67e9feb528bc47fe1080 Mon Sep 17 00:00:00 2001 From: zhangbinhub Date: Tue, 24 Dec 2024 14:49:04 +0800 Subject: [PATCH] v6.7.0 --- README.md | 8 ++++---- doc/version_history.md | 12 +++++++++++ gradle/dependencies.gradle | 18 ++++++++--------- gradle/moduleVersion.gradle | 20 +++++++++---------- .../admin/gateway/conf/RouteConfiguration.kt | 20 ------------------- .../conf/AuthorizationServerConfiguration.kt | 6 +++--- 6 files changed, 38 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 2ce4c0e2..c09f244c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # acp-admin-cloud -###### v6.6.1 [版本更新日志](doc/version_history.md) +###### v6.7.0 [版本更新日志](doc/version_history.md) - 使用Application Construction Platform 应用构建平台作为脚手架 - 基于 Spring Cloud 的微服务版本,基于 Spring Boot @@ -9,9 +9,9 @@ ## 相关组件版本 -- [Spring Boot 3.3.6](https://projects.spring.io/spring-boot) -- [Spring Boot Admin 3.3.6](https://github.com/codecentric/spring-boot-admin) -- [Acp 2024.3.2](https://gitee.com/zhangbinhub/acp) +- [Spring Boot 3.4.1](https://projects.spring.io/spring-boot) +- [Spring Boot Admin 3.4.1](https://github.com/codecentric/spring-boot-admin) +- [Acp 2025.0.0](https://gitee.com/zhangbinhub/acp) - [sensitive](https://github.com/houbb/sensitive) ## 技术栈 diff --git a/doc/version_history.md b/doc/version_history.md index 976e33b2..9ece10b9 100644 --- a/doc/version_history.md +++ b/doc/version_history.md @@ -1,5 +1,17 @@ ## 版本更新记录 +##### v6.7.0 + +- Global + - [Upgrade] 升级依赖 + - Acp 2025.0.0 + - Spring Boot 3.4.1 + - Spring Boot Admin 3.4.1 +- gateway-server + - 删除`writeableHeaders`自定义`WebFilter` +- oauth-server + - 修改 csrf 配置 + ##### v6.6.1 - Global diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index d2f96cfe..cfccb1bf 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -1,14 +1,14 @@ ext { - versions = [:] + versions = [:] } versions += [ - kotlin : "2.1.0", - springBoot : "3.3.6", - springBootAdmin : "3.3.6", - acp : "2024.3.2", - sensitive : "1.7.0", - sensitiveDeepCopy: "0.0.1", - camunda : "7.22.0", - mysql : "9.1.0" + kotlin : "2.1.0", + springBoot : "3.4.1", + springBootAdmin : "3.4.1", + acp : "2025.0.0", + sensitive : "1.7.0", + sensitiveDeepCopy: "0.0.1", + camunda : "7.22.0", + mysql : "9.1.0" ] \ No newline at end of file diff --git a/gradle/moduleVersion.gradle b/gradle/moduleVersion.gradle index 20fbf176..c188b3d9 100644 --- a/gradle/moduleVersion.gradle +++ b/gradle/moduleVersion.gradle @@ -1,30 +1,30 @@ project(':acp-admin-cloud-constant') { - version '6.6.1' + version '6.7.0' } project(':acp-admin-cloud-dependencies') { - version '6.6.1' + version '6.7.0' } project(':acp-admin-cloud-dependencies-resource-server') { - version '6.6.1' + version '6.7.0' } project(':admin-server') { - version '6.6.1' + version '6.7.0' } project(':deploy-server') { - version '6.6.1' + version '6.7.0' } project(':gateway-server') { - version '6.6.1' + version '6.7.0' } project(':log-server') { - version '6.6.1' + version '6.7.0' } project(':oauth-server') { - version '6.6.1' + version '6.7.0' } project(':route-server') { - version '6.6.1' + version '6.7.0' } project(':workflow-server') { - version '6.6.1' + version '6.7.0' } \ No newline at end of file diff --git a/modules/gateway-server/src/main/kotlin/io/gitee/zhangbinhub/admin/gateway/conf/RouteConfiguration.kt b/modules/gateway-server/src/main/kotlin/io/gitee/zhangbinhub/admin/gateway/conf/RouteConfiguration.kt index 16aa9425..d0310d0a 100644 --- a/modules/gateway-server/src/main/kotlin/io/gitee/zhangbinhub/admin/gateway/conf/RouteConfiguration.kt +++ b/modules/gateway-server/src/main/kotlin/io/gitee/zhangbinhub/admin/gateway/conf/RouteConfiguration.kt @@ -17,20 +17,16 @@ import org.springframework.cloud.stream.function.StreamBridge import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration import org.springframework.core.Ordered -import org.springframework.core.annotation.Order import org.springframework.core.io.buffer.DataBuffer import org.springframework.core.io.buffer.DataBufferFactory import org.springframework.http.HttpHeaders import org.springframework.http.MediaType -import org.springframework.http.server.reactive.ServerHttpRequestDecorator import org.springframework.http.server.reactive.ServerHttpResponseDecorator import org.springframework.web.server.ServerWebExchange -import org.springframework.web.server.WebFilter import reactor.core.publisher.Flux import reactor.core.publisher.Mono /** - * @author zhang by 17/12/2018 00:41 * @since JDK 11 */ @Configuration(proxyBeanMethods = false) @@ -46,22 +42,6 @@ class RouteConfiguration @Autowired constructor(private val routeLogService: Rou fun routeLogBridge(streamBridge: StreamBridge, objectMapper: ObjectMapper) = RouteLogBridge(streamBridge, objectMapper, RouteConstant.ROUTE_LOG_OUTPUT) - @Bean - @Order(Ordered.HIGHEST_PRECEDENCE) - fun writeableHeaders(): WebFilter = WebFilter { exchange, chain -> - HttpHeaders.writableHttpHeaders(exchange.request.headers).let { writeableHeaders -> - object : ServerHttpRequestDecorator(exchange.request) { - override fun getHeaders(): HttpHeaders { - return writeableHeaders - } - }.let { writeableRequest -> - exchange.mutate().request(writeableRequest).build() - }.let { writeableExchange -> - chain.filter(writeableExchange) - } - } - } - @Bean fun logRequestFilter(routeLogBridge: RouteLogBridge): GlobalFilter = GlobalFilter { exchange, chain -> exchange.mutate().request(exchange.request.mutate().headers { httpHeaders: HttpHeaders -> diff --git a/modules/oauth-server/src/main/kotlin/io/gitee/zhangbinhub/admin/oauth/conf/AuthorizationServerConfiguration.kt b/modules/oauth-server/src/main/kotlin/io/gitee/zhangbinhub/admin/oauth/conf/AuthorizationServerConfiguration.kt index 4340dfca..79879611 100644 --- a/modules/oauth-server/src/main/kotlin/io/gitee/zhangbinhub/admin/oauth/conf/AuthorizationServerConfiguration.kt +++ b/modules/oauth-server/src/main/kotlin/io/gitee/zhangbinhub/admin/oauth/conf/AuthorizationServerConfiguration.kt @@ -37,9 +37,9 @@ import org.springframework.security.oauth2.server.authorization.token.Delegating import org.springframework.security.oauth2.server.authorization.token.OAuth2AccessTokenGenerator import org.springframework.security.oauth2.server.authorization.token.OAuth2RefreshTokenGenerator import org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator -import org.springframework.security.oauth2.server.authorization.web.authentication.DelegatingAuthenticationConverter import org.springframework.security.oauth2.server.authorization.web.authentication.OAuth2ClientCredentialsAuthenticationConverter import org.springframework.security.web.SecurityFilterChain +import org.springframework.security.web.authentication.DelegatingAuthenticationConverter import org.springframework.security.web.util.matcher.AntPathRequestMatcher import org.springframework.web.bind.annotation.RequestMethod import org.springframework.web.client.RestClient @@ -76,7 +76,7 @@ class AuthorizationServerConfiguration @Autowired constructor( @Throws(Exception::class) fun acpBasicSecurityFilterChain(httpSecurity: HttpSecurity): SecurityFilterChain? { // 配置 endpoint 策略 - httpSecurity.csrf { it.disable() } + httpSecurity.csrf { it.ignoringRequestMatchers("/**") } .securityMatcher( "$contextPath${webEndpointProperties.basePath}", "$contextPath${webEndpointProperties.basePath}/**" @@ -104,7 +104,7 @@ class AuthorizationServerConfiguration @Autowired constructor( val authorizationServerConfigurer = OAuth2AuthorizationServerConfigurer() httpSecurity.with(authorizationServerConfigurer, Customizer.withDefaults()) // 配置 endpoint 策略 - httpSecurity.csrf { it.disable() }.authorizeHttpRequests { authorizeRequests -> + httpSecurity.csrf { it.ignoringRequestMatchers("/**") }.authorizeHttpRequests { authorizeRequests -> authorizeRequests.requestMatchers(authorizationServerConfigurer.endpointsMatcher).permitAll() .requestMatchers(AntPathRequestMatcher("/**", RequestMethod.OPTIONS.name)).permitAll() .requestMatchers(*security.map { AntPathRequestMatcher(it) }.toTypedArray()).authenticated() -- Gitee