Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mica
mica
提交
816ed30b
mica
项目概览
mica
/
mica
通知
10
Star
2
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
mica
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
816ed30b
编写于
5月 10, 2021
作者:
如梦技术
🐛
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
✨
去除部分 spring-native 支持 #38 #I3PX2N
上级
15105fcb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
0 addition
and
55 deletion
+0
-55
mica-caffeine/build.gradle
mica-caffeine/build.gradle
+0
-1
mica-caffeine/src/main/java/net/dreamlu/mica/caffeine/config/CaffeineAutoCacheConfiguration.java
.../mica/caffeine/config/CaffeineAutoCacheConfiguration.java
+0
-43
mica-logging/build.gradle
mica-logging/build.gradle
+0
-1
mica-logging/src/main/java/net/dreamlu/mica/logging/config/LoggingInitializer.java
...a/net/dreamlu/mica/logging/config/LoggingInitializer.java
+0
-7
mica-logging/src/main/java/net/dreamlu/mica/logging/config/MicaLoggingConfiguration.java
...dreamlu/mica/logging/config/MicaLoggingConfiguration.java
+0
-3
未找到文件。
mica-caffeine/build.gradle
浏览文件 @
816ed30b
...
...
@@ -2,6 +2,5 @@ dependencies {
api
project
(
":mica-core"
)
api
"com.github.ben-manes.caffeine:caffeine"
api
"org.springframework.boot:spring-boot-starter-cache"
compileOnly
"org.springframework.experimental:spring-native:${springnativeVersion}"
annotationProcessor
"net.dreamlu:mica-auto:${micaAutoVersion}"
}
mica-caffeine/src/main/java/net/dreamlu/mica/caffeine/config/CaffeineAutoCacheConfiguration.java
浏览文件 @
816ed30b
...
...
@@ -33,10 +33,6 @@ import org.springframework.cache.caffeine.CaffeineCacheManager;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.lang.Nullable
;
import
org.springframework.nativex.hint.AccessBits
;
import
org.springframework.nativex.hint.FieldHint
;
import
org.springframework.nativex.hint.NativeHint
;
import
org.springframework.nativex.hint.TypeHint
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
...
...
@@ -54,45 +50,6 @@ import java.util.stream.Collectors;
@ConditionalOnMissingBean
(
CacheManager
.
class
)
@ConditionalOnClass
({
Caffeine
.
class
,
CaffeineCacheManager
.
class
})
@AutoConfigureBefore
(
name
=
"org.springframework.boot.autoconfigure.cache.CaffeineCacheConfiguration"
)
@NativeHint
(
types
=
{
@TypeHint
(
types
=
CaffeineAutoCacheManager
.
class
,
access
=
AccessBits
.
ALL
),
@TypeHint
(
types
=
CaffeineCacheManager
.
class
,
access
=
AccessBits
.
ALL
),
@TypeHint
(
typeNames
=
"com.github.benmanes.caffeine.cache.UnsafeAccess"
,
fields
=
@FieldHint
(
name
=
"UNSAFE"
,
allowUnsafeAccess
=
true
),
access
=
AccessBits
.
PUBLIC_METHODS
),
@TypeHint
(
types
=
Thread
.
class
,
access
=
AccessBits
.
DECLARED_FIELDS
),
@TypeHint
(
typeNames
=
"com.github.benmanes.caffeine.cache.PS"
,
fields
=
{
@FieldHint
(
name
=
"key"
,
allowUnsafeAccess
=
true
),
@FieldHint
(
name
=
"value"
,
allowUnsafeAccess
=
true
)
},
access
=
AccessBits
.
DECLARED_CONSTRUCTORS
),
@TypeHint
(
typeNames
=
"com.github.benmanes.caffeine.cache.PSA"
,
fields
=
@FieldHint
(
name
=
"accessTime"
,
allowUnsafeAccess
=
true
),
access
=
AccessBits
.
DECLARED_CONSTRUCTORS
),
@TypeHint
(
typeNames
=
"com.github.benmanes.caffeine.cache.PSW"
,
fields
=
@FieldHint
(
name
=
"writeTime"
,
allowUnsafeAccess
=
true
),
access
=
AccessBits
.
DECLARED_CONSTRUCTORS
),
@TypeHint
(
typeNames
=
"com.github.benmanes.caffeine.cache.StripedBuffer"
,
fields
=
{
@FieldHint
(
name
=
"tableBusy"
,
allowUnsafeAccess
=
true
)},
access
=
AccessBits
.
ALL
),
@TypeHint
(
typeNames
=
"com.github.benmanes.caffeine.cache.PSWMS"
,
access
=
AccessBits
.
DECLARED_CONSTRUCTORS
),
@TypeHint
(
typeNames
=
"com.github.benmanes.caffeine.cache.SSA"
,
access
=
AccessBits
.
ALL
),
@TypeHint
(
typeNames
=
"com.github.benmanes.caffeine.cache.SSLA"
,
access
=
AccessBits
.
DECLARED_CONSTRUCTORS
),
@TypeHint
(
typeNames
=
"com.github.benmanes.caffeine.cache.SSLMSW"
,
access
=
AccessBits
.
DECLARED_CONSTRUCTORS
),
@TypeHint
(
typeNames
=
"com.github.benmanes.caffeine.cache.SSMSW"
,
access
=
AccessBits
.
DECLARED_CONSTRUCTORS
),
@TypeHint
(
typeNames
=
"com.github.benmanes.caffeine.cache.BoundedBuffer"
,
access
=
AccessBits
.
ALL
),
@TypeHint
(
typeNames
=
"com.github.benmanes.caffeine.cache.BoundedBuffer$RingBuffer"
,
access
=
AccessBits
.
ALL
),
@TypeHint
(
typeNames
=
"com.github.benmanes.caffeine.cache.BLCHeader$DrainStatusRef"
,
fields
=
@FieldHint
(
name
=
"drainStatus"
,
allowUnsafeAccess
=
true
),
access
=
AccessBits
.
ALL
)
})
public
class
CaffeineAutoCacheConfiguration
{
@Bean
...
...
mica-logging/build.gradle
浏览文件 @
816ed30b
...
...
@@ -5,6 +5,5 @@ dependencies {
implementation
"org.springframework.boot:spring-boot-autoconfigure"
compileOnly
"org.springframework.cloud:spring-cloud-context"
compileOnly
"net.dreamlu:mica-auto:${micaAutoVersion}"
compileOnly
"org.springframework.experimental:spring-native:${springnativeVersion}"
annotationProcessor
"net.dreamlu:mica-auto:${micaAutoVersion}"
}
mica-logging/src/main/java/net/dreamlu/mica/logging/config/LoggingInitializer.java
浏览文件 @
816ed30b
...
...
@@ -17,7 +17,6 @@
package
net.dreamlu.mica.logging.config
;
import
net.dreamlu.mica.auto.annotation.AutoEnvPostProcessor
;
import
net.dreamlu.mica.core.graalvm.NativeUtil
;
import
net.dreamlu.mica.logging.utils.LoggingUtil
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.env.EnvironmentPostProcessor
;
...
...
@@ -38,12 +37,6 @@ public class LoggingInitializer implements EnvironmentPostProcessor, Ordered {
String
logBase
=
environment
.
getProperty
(
"logging.file.path"
,
LoggingUtil
.
DEFAULT_LOG_DIR
);
// 用于 spring boot admin 中展示日志
System
.
setProperty
(
"logging.file.name"
,
logBase
+
"/${spring.application.name}/"
+
LoggingUtil
.
LOG_FILE_ALL
);
// graal 下 logback 单独配置 issues: https://github.com/spring-projects-experimental/spring-native/issues/607
if
(
NativeUtil
.
inNativeImage
())
{
String
rootLogLevel
=
environment
.
getProperty
(
"logging.level.root"
,
"INFO"
);
System
.
setProperty
(
"rootLogLevel"
,
rootLogLevel
);
System
.
setProperty
(
"logging.config"
,
"classpath:logback-spring-graalvm.xml"
);
}
}
@Override
...
...
mica-logging/src/main/java/net/dreamlu/mica/logging/config/MicaLoggingConfiguration.java
浏览文件 @
816ed30b
...
...
@@ -32,8 +32,6 @@ import org.springframework.core.Ordered;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.type.AnnotatedTypeMetadata
;
import
org.springframework.nativex.hint.NativeHint
;
import
org.springframework.nativex.hint.ResourceHint
;
import
org.springframework.util.ClassUtils
;
import
java.lang.annotation.*
;
...
...
@@ -50,7 +48,6 @@ import java.util.Objects;
@Order
(
Ordered
.
HIGHEST_PRECEDENCE
)
@Configuration
(
proxyBeanMethods
=
false
)
@EnableConfigurationProperties
(
MicaLoggingProperties
.
class
)
@NativeHint
(
resources
=
@ResourceHint
(
patterns
=
"^logback-spring-graalvm.xml"
))
public
class
MicaLoggingConfiguration
{
@Bean
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录