Compare commits

..

No commits in common. "0ca32efc028bcfc16a0a8f3857224655857ea625" and "9cdc962d9abbe5921c688deb43de1547099e5e65" have entirely different histories.

5 changed files with 8 additions and 16 deletions

View File

@ -105,7 +105,7 @@ subprojects {
}
}
// Gitea 仓库
val host = System.getenv("GITEA_HOST")
val host = System.getenv("GEWUYOU_GITEA_HOST")
host?.let {
maven {
isAllowInsecureProtocol = true
@ -113,7 +113,7 @@ subprojects {
url = uri("http://${it}/api/packages/gewuyou/maven")
credentials(HttpHeaderCredentials::class.java) {
name = "Authorization"
value = "token ${System.getenv("GITEA_TOKEN")}"
value = "token ${System.getenv("GEWUYOU_GITEA_TOKEN")}"
}
authentication {
create("header", HttpHeaderAuthentication::class.java)

View File

@ -1,7 +1,7 @@
// This file is used to define the repositories used by the project.
repositories {
mavenLocal()
val host = System.getenv("GITEA_HOST")
val host = System.getenv("GEWUYOU_GITEA_HOST")
host?.let {
maven{
url = uri("http://${host}/api/packages/gewuyou/maven")

View File

@ -18,7 +18,7 @@ data class R<T>(
val message: String,
val data: T? = null,
val requestId: String? = null,
val extra: Map<String, Any?> = emptyMap()
val extra: Map<String, Any?> = emptyMap() // ✅ 扩展字段保存位置
) {
/**
* 转换为可变 Map包含 extra 中的字段
@ -33,7 +33,7 @@ data class R<T>(
if (!requestId.isNullOrBlank()) {
map["requestId"] = requestId
}
map.putAll(extra)
map.putAll(extra) // ✅ 扁平化合并
return map
}

View File

@ -11,7 +11,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author gewuyou
* @since 2025-05-02 11:52:24
*/
@ConfigurationProperties(prefix = "forgeboot.version")
@ConfigurationProperties(prefix = "version")
public class VersionProperties {
/**
* API前缀

View File

@ -6,8 +6,6 @@ import com.gewuyou.forgeboot.webmvc.version.mapping.ApiVersionRequestMappingHand
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.web.cors.CorsConfigurationSource
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
/**
*版本自动配置
@ -28,14 +26,8 @@ open class VersionAutoConfiguration {
* @return ApiVersionRequestMappingHandlerMapping 实例用于处理基于 API 版本的请求映射
*/
@Bean
open fun apiVersionRequestMappingHandlerMapping(
versionProperties: VersionProperties,
corsConfigurationSource: CorsConfigurationSource,
): RequestMappingHandlerMapping {
open fun apiVersionRequestMappingHandlerMapping(versionProperties: VersionProperties): ApiVersionRequestMappingHandlerMapping {
log.info("创建 API 版本请求映射处理程序映射")
return ApiVersionRequestMappingHandlerMapping(versionProperties).also {
it.order = Int.MIN_VALUE
it.corsConfigurationSource = corsConfigurationSource
}
return ApiVersionRequestMappingHandlerMapping(versionProperties).also { it.order = Int.MIN_VALUE }
}
}