Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Praper for Virtual Thread in Java 21 (Gradle) #215

Merged
merged 218 commits into from
May 13, 2023
Merged
Changes from 1 commit
Commits
Show all changes
218 commits
Select commit Hold shift + click to select a range
aa0f636
Init for dev_3.x with Java 19
lWoHvYe Sep 20, 2022
d7c76f7
Trigger a Build Error
lWoHvYe Sep 20, 2022
883efb8
ReBuild lombok to Support Java 19 (Just Snapshot)
lWoHvYe Sep 21, 2022
82047bf
1. 显而易见,只要Runtime满足,lowerVersion can Call HigherVersion (Starter-18 c…
lWoHvYe Sep 22, 2022
93356c9
部分IO密集型业务,比如方法内多次SearchDB且无严格顺序,则可以用Virtual Threads来优化。虽然代码量变多了
lWoHvYe Sep 22, 2022
b77e327
Upgrade Spring Boot to 2.7.4
lWoHvYe Sep 27, 2022
81f11cd
Use auto-service to gen META-INF/services/xxx for SPI(ServiceLoader)
lWoHvYe Oct 1, 2022
1790c42
Try Virtual Thread Pool
lWoHvYe Oct 4, 2022
ba1add8
Virtual Threads 不需要池化,但使用Pool一方面可以兼容旧的API,另一方面也可以对Thread统一的进行命名
lWoHvYe Oct 9, 2022
d84c7b8
Update ASM(In lombok) to 9.4 to Support Java 19 & 20
lWoHvYe Oct 12, 2022
a31f75d
Spring 6.x & Spring Boot 3.x Will Support Virtual Threads
lWoHvYe Oct 13, 2022
4a3ef6a
Erysimum amurense Kitagawa
lWoHvYe Oct 16, 2022
3239378
@Value bind map & list
dependabot[bot] Oct 18, 2022
13f3b04
Update dependency
lWoHvYe Oct 23, 2022
ae77f3f
Simple diff for use @Value to Inject map
lWoHvYe Oct 24, 2022
538a745
remove reactive-starter
lWoHvYe Oct 24, 2022
5ed6777
remove undertow in unicorn-reactive
lWoHvYe Oct 24, 2022
61a1b3f
Simple use of @PropertySource, see https://www.lwohvye.com/2022/10/26…
lWoHvYe Oct 27, 2022
db75ecc
花神诞祭
lWoHvYe Oct 27, 2022
fe32189
true | false
lWoHvYe Nov 3, 2022
e3409f1
F: Test SpringBoot 3.0, Simple with issues
lWoHvYe Nov 12, 2022
4427cfa
comment unused code
lWoHvYe Nov 12, 2022
aab8a49
Change the dependency of captcha to support Boot 3.0, while publish t…
lWoHvYe Nov 13, 2022
41bff81
swagger is ready
lWoHvYe Nov 13, 2022
f3e1ecb
SpringSecurity is ready 🎉🎉
lWoHvYe Nov 13, 2022
95e9fa9
redisson works well with boot3.0 after a bit changes
lWoHvYe Nov 19, 2022
c209803
remove ex-lib
lWoHvYe Nov 21, 2022
a521c7c
update dependency
lWoHvYe Nov 21, 2022
ac08dba
Merge branch 'main' into integrate-boot3.0-dev
lWoHvYe Nov 21, 2022
4ae9f97
#174 Ready for boot 3.0 & framework 6.0.2
lWoHvYe Nov 24, 2022
b074ce7
#174 Spring Boot is GA
lWoHvYe Nov 24, 2022
783c981
#176 OpenAPI is released
lWoHvYe Nov 25, 2022
e4251c7
1.remove deprecated query-anno `EQUAL_IN_MULTI_JOIN`
lWoHvYe Nov 26, 2022
3bb64ac
reset redisson to 3.18.0, wtf new release to support boot 3.0
lWoHvYe Nov 26, 2022
eed3f31
fixup! 1.remove deprecated query-anno `EQUAL_IN_MULTI_JOIN` 2.add cas…
lWoHvYe Nov 26, 2022
58bd1aa
try sync up with main branch
lWoHvYe Nov 29, 2022
67c0031
fixup! try sync up with main branch
lWoHvYe Nov 29, 2022
4210541
swatch webContainer to Tomcat. try Virtual-Threads on Spring Application
lWoHvYe Nov 29, 2022
39c6273
remove use of kotlin
lWoHvYe Nov 29, 2022
cb7309b
fixup! swatch webContainer to Tomcat. try Virtual-Threads on Spring A…
lWoHvYe Nov 29, 2022
154c9c6
Pressure Test with VT
lWoHvYe Nov 30, 2022
e689193
Config AutoConfigExclude in property
lWoHvYe Nov 30, 2022
368cccb
remove deprecated class
lWoHvYe Dec 1, 2022
df7d04c
spring-boot:build-image
lWoHvYe Dec 2, 2022
cb69959
snapshot: try to use custom lombok-package
lWoHvYe Dec 3, 2022
e8637e5
Revert "snapshot: try to use custom lombok-package"
lWoHvYe Dec 3, 2022
7a1a66b
change cos to s3. fixed mail issue
lWoHvYe Dec 4, 2022
c713793
update img build config
lWoHvYe Dec 4, 2022
1f3bb2b
苟利国家生死以,岂因祸福避趋之
lWoHvYe Dec 6, 2022
f9adc84
add custom jar to env
lWoHvYe Dec 8, 2022
decd8b0
fixup! add custom jar to env
lWoHvYe Dec 8, 2022
236dbfd
fixup! change structure
lWoHvYe Dec 9, 2022
8675fd8
remove unused method in BassMapper
lWoHvYe Dec 9, 2022
d6e1fb2
adjust project structure
lWoHvYe Dec 10, 2022
1648564
adjust project structure
lWoHvYe Dec 11, 2022
8178294
fixed issue of role query
lWoHvYe Dec 11, 2022
4d3fe10
change captcha to optional
lWoHvYe Dec 12, 2022
8ab156b
change project structure
lWoHvYe Dec 13, 2022
e42f54d
Merge branch 'main' into dev_3.x
lWoHvYe Dec 13, 2022
5ec2162
main Threads, normal Threads, CarrierThreads & VirtualThreads
lWoHvYe Dec 13, 2022
6850329
swatch to gradle
lWoHvYe Dec 13, 2022
8d744a0
completed starter
lWoHvYe Dec 13, 2022
9456a0c
Merge branch 'main' into dev_3.x
lWoHvYe Dec 13, 2022
43fd2f7
draft
lWoHvYe Dec 14, 2022
83f99e6
support modify module-info.java
lWoHvYe Dec 14, 2022
f20d72a
gradle don't need to open module resources while maven needed
lWoHvYe Dec 14, 2022
b90b0d6
try build image
lWoHvYe Dec 14, 2022
1968b5c
gradle feature - draft
lWoHvYe Dec 15, 2022
97b837c
remove docker-image.yml
lWoHvYe Dec 15, 2022
b1d047b
packaged ( 使用的jar是modify之后的,所以不必担心develop时对jar做了enhance,pkg后run不起来的is…
lWoHvYe Dec 16, 2022
8ffcd1a
fixed issue
lWoHvYe Dec 16, 2022
4d57e70
Bump springdoc.openapi.version from 2.0.0 to 2.0.2
lWoHvYe Dec 17, 2022
ab45ef3
add Manifest
lWoHvYe Dec 20, 2022
de35518
try config Nexus OSSRH
lWoHvYe Dec 21, 2022
4cf690b
fixup! try config Nexus OSSRH
lWoHvYe Dec 21, 2022
196aa41
boring enterprisy thinking
lWoHvYe Dec 22, 2022
883c5fb
draft signing root.artifacts
lWoHvYe Dec 22, 2022
ed6b31b
try use Encrypted secrets
lWoHvYe Dec 22, 2022
13a0955
fixup! try use Encrypted secrets (#3)
lWoHvYe Dec 22, 2022
99f1cc5
draft sign artifacts
lWoHvYe Dec 25, 2022
c95be91
update module names
lWoHvYe Dec 26, 2022
024bc82
for gradle feature_variants
lWoHvYe Dec 26, 2022
d809183
sync up
lWoHvYe Dec 26, 2022
f2b8747
Merge branch 'lWoHvYe-dev_3.x' into dev_3.x
lWoHvYe Dec 26, 2022
3482ae5
Create gradle-publish.yml
lWoHvYe Dec 22, 2022
3ea2b50
Bump gradle/gradle-build-action from 2.2.1 to 2.3.3 (#4)
dependabot[bot] Dec 25, 2022
e87c39e
OSSRH SNAPSHOT publish
lWoHvYe Dec 26, 2022
fe82523
try fixup
lWoHvYe Dec 26, 2022
cf98364
try fixup
lWoHvYe Dec 26, 2022
1a67aa2
try fixup
lWoHvYe Dec 26, 2022
dd7717a
try fixup
lWoHvYe Dec 26, 2022
2a57e43
todo: LambdaMetafactory & CallSite
lWoHvYe Dec 29, 2022
b44c8b4
switch to org.gradlex:extra-java-module-info
lWoHvYe Dec 30, 2022
0a9978b
specific extra-repo for buildscript
lWoHvYe Dec 30, 2022
a70571f
Merge pull request #193 from WHY-lWoHvYe/dev_3.x
lWoHvYe Dec 30, 2022
891583c
win-win
lWoHvYe Dec 31, 2022
c9374f1
Merge branch 'lWoHvYe:dev_3.x' into dev_3.x
lWoHvYe Dec 31, 2022
5e5bc6e
win-win
lWoHvYe Dec 31, 2022
e8c0cf4
Merge branch 'lWoHvYe:dev_3.x' into dev_3.x
lWoHvYe Dec 31, 2022
5b0f890
win-win update Copyright
lWoHvYe Jan 1, 2023
7743ac7
try gradle scan
lWoHvYe Jan 1, 2023
f1097f1
update SpringContextHolder
lWoHvYe Jan 1, 2023
c103ae3
Merge pull request #196 from WHY-lWoHvYe/dev_3.x
lWoHvYe Jan 1, 2023
6085179
dev_3.x_pipeline
lWoHvYe Jan 2, 2023
752de76
try GraalVM Native Images
lWoHvYe Jan 5, 2023
eb64ab9
fixup! try GraalVM Native Images
lWoHvYe Jan 5, 2023
aadf5d7
try fixup! (#6)
lWoHvYe Jan 7, 2023
9f43b56
Update gradle.properties
lWoHvYe Jan 16, 2023
c358256
kotlin & loom
lWoHvYe Jan 21, 2023
4fa3fc3
coroutines & loom patch 1.draft
lWoHvYe Jan 22, 2023
1f09f9f
Loom can work as carrier thread for coroutines.
lWoHvYe Jan 22, 2023
91645a6
update dependency
lWoHvYe Jan 24, 2023
75dca86
Merge branch 'lWoHvYe:dev_3.x' into dev_3.x
lWoHvYe Jan 26, 2023
6c35a90
Valhalla
lWoHvYe Jan 26, 2023
9598ce5
Modify Structure
lWoHvYe Jan 26, 2023
567665b
fixup! Modify Structure (#7)
lWoHvYe Jan 26, 2023
d659c95
Merge pull request #202 from WHY-lWoHvYe/dev_3.x
lWoHvYe Jan 26, 2023
ff1c95b
fixed issue (can't start up)
lWoHvYe Jan 31, 2023
d2bc32b
Official lombok for JDK 19 is release
lWoHvYe Feb 5, 2023
42ca5d6
Merge pull request #203 from WHY-lWoHvYe/dev_3.x
lWoHvYe Feb 5, 2023
daf248c
seems kotlin (coroutines) is not fully support jigsaw yet
lWoHvYe Feb 7, 2023
8ef5876
try use oracle
lWoHvYe Feb 8, 2023
c88b64c
mapstruct-spring-extensions seems unused
lWoHvYe Feb 10, 2023
1d459ee
we can confirm that we don't need mapstruct-spring-extensions in our …
lWoHvYe Feb 10, 2023
2ff57c5
update auto-module-name
lWoHvYe Feb 11, 2023
d7fb7d6
change publish plugin
lWoHvYe Feb 14, 2023
03777f7
- fixed javadoc issue
lWoHvYe Feb 16, 2023
710a934
`@snippet : ` 冒号别忘了
lWoHvYe Feb 16, 2023
c3cad28
update configure structure
lWoHvYe Feb 17, 2023
294feaa
MethodHandle,注意对可变参数的传递可能会导致问题
lWoHvYe Feb 22, 2023
75f5e61
Bump gradle/gradle-build-action from 2.3.3 to 2.4.0 (#8)
dependabot[bot] Feb 22, 2023
155ae8a
Clarify the reason of pre-commit
lWoHvYe Feb 22, 2023
a045046
try LambdaMetafactory
lWoHvYe Feb 23, 2023
ba391a4
如果能函数复用,则LambdaMetafactory会有比较大的优势,不然是完全不及findVirtual的,具体看随附的UT
lWoHvYe Feb 24, 2023
5e324e9
format name
lWoHvYe Feb 24, 2023
90d1a31
alpha -> beta
lWoHvYe Feb 24, 2023
ef81ff3
try fixed publish issue
lWoHvYe Feb 25, 2023
fe7ca08
update for merge
lWoHvYe Feb 27, 2023
116f23e
spring-boot-starter-webflux 3.0.3/spring framework 6.0.5 has split pa…
lWoHvYe Mar 2, 2023
72a5513
local build
lWoHvYe Mar 2, 2023
3776178
Merge remote-tracking branch 'origin/dev_3.x' into delta-oauth20
lWoHvYe Mar 2, 2023
b1c0c2d
Thanks JetBrains license for non-commercial open source projects.
lWoHvYe Mar 3, 2023
41b2361
try fixed
lWoHvYe Mar 3, 2023
5dbca8c
try multi branches
lWoHvYe Mar 3, 2023
6dc9a1a
Merge remote-tracking branch 'origin/main' into delta-oauth2.0
lWoHvYe Mar 3, 2023
6154234
try fixed
lWoHvYe Mar 4, 2023
f338d7e
try fixed
lWoHvYe Mar 4, 2023
e47d090
try fixed
lWoHvYe Mar 4, 2023
12946a1
Merge remote-tracking branch 'rm-fork/main'
lWoHvYe Mar 4, 2023
f0c7cd6
Revert: fix native-build in spring-boot 3.0.3/spring framework 6.0.5 …
lWoHvYe Mar 4, 2023
fe8d8f2
upgrade Spring Boot Version
lWoHvYe Mar 7, 2023
7c64fea
Scoped Values in Java 20
lWoHvYe Mar 8, 2023
4de7bd9
upgrade dependency
lWoHvYe Mar 9, 2023
5636b62
Merge remote-tracking branch 'origin/main' into delta-oauth2.0
lWoHvYe Mar 9, 2023
b0a1877
try Scoped Values in Java 20
lWoHvYe Mar 9, 2023
d1617b6
update configure structure
lWoHvYe Mar 12, 2023
2e79d53
update workflow
lWoHvYe Mar 16, 2023
ee1b6ec
fixup! update workflow
lWoHvYe Mar 16, 2023
95b4d29
gamma with Java 20
lWoHvYe Mar 18, 2023
8a80849
coroutines 1.7.0-Beta 若DeBug会报错: module kotlin.stdlib does not read m…
lWoHvYe Mar 18, 2023
ddfbc85
gamma -> delta \r\n delta is coming
lWoHvYe Mar 18, 2023
cdbef8f
trigger build
lWoHvYe Mar 21, 2023
b13e9b8
oauth2.0 in legacy version
lWoHvYe Mar 22, 2023
5d68e73
rename
lWoHvYe Mar 23, 2023
8021b45
oauth2.0 distributed module in legacy version
lWoHvYe Mar 23, 2023
4300804
rename
lWoHvYe Mar 23, 2023
0148eed
[#217] Official AuthorizationServer
lWoHvYe Mar 23, 2023
557d2cd
[#217] combine legacy oauth2 module
lWoHvYe Mar 24, 2023
ef30eb3
[#217] Formalization
lWoHvYe Mar 24, 2023
9ac58a7
跑通sample只是第一步
lWoHvYe Mar 24, 2023
bf3f6e2
add some docs
lWoHvYe Mar 25, 2023
012ed8a
add confirm consent
lWoHvYe Mar 26, 2023
3aa64b3
simply disable kotlin, wtf support Java 20
lWoHvYe Mar 26, 2023
825b32f
try fix
lWoHvYe Mar 26, 2023
e1410c5
try fix, docker issue will need bellsoft-liberica/GraalVM suport Java…
lWoHvYe Mar 26, 2023
3af3ba1
try fixed
lWoHvYe Mar 26, 2023
879939e
prepare for Java 21, lombok side
lWoHvYe Mar 27, 2023
2094158
daily update
lWoHvYe Mar 28, 2023
989b24d
id_token
lWoHvYe Mar 28, 2023
b763583
separate module to try kotlin
lWoHvYe Mar 29, 2023
fdeadc2
[#217] draft gateway
lWoHvYe Mar 31, 2023
86dce30
[#217] still have issue with Authority, seems just validate token not…
lWoHvYe Apr 1, 2023
0e971ec
不使用Gateway时,client会自动维护token及refresh,使用后经Gateway的部分还有各种问题
lWoHvYe Apr 2, 2023
b62e36e
draft try kotlin 1.8.20
lWoHvYe Apr 4, 2023
b6420a7
draft 2.0
lWoHvYe Apr 5, 2023
bbb459b
draft 2.1
lWoHvYe Apr 5, 2023
e23938c
draft 2.2 revert kotlin
lWoHvYe Apr 5, 2023
898c278
fixup! 不使用Gateway时,client会自动维护token及refresh,使用后经Gateway的部分需要自己维护Token
lWoHvYe Apr 5, 2023
64311a6
draft simple integrate with core
lWoHvYe Apr 5, 2023
63455bd
delta is gone, epsilon is coming
lWoHvYe Apr 5, 2023
86da65b
clarify sth of oauth2.0
lWoHvYe Apr 5, 2023
6d5595b
Implement core Authorization Services with JPA
lWoHvYe Apr 5, 2023
f2bb3d7
Tomcat with loom - for independent services
lWoHvYe Apr 8, 2023
659bcdb
[#217] Authorization Server: use User from db, which is managed by Se…
lWoHvYe Apr 10, 2023
be6c22b
simple cacheable
lWoHvYe Apr 11, 2023
261da64
currently can only run with unnamed module
lWoHvYe Apr 11, 2023
217ef99
fail to run with named module.
lWoHvYe Apr 14, 2023
48d52b1
Merge remote-tracking branch 'rm-fork/main'
lWoHvYe Apr 14, 2023
92f8284
在 ChatGPT 协助下弄明白了一些协程的问题
lWoHvYe Apr 14, 2023
ba17215
fixed issue with dependabot
lWoHvYe Apr 14, 2023
28cda94
Bump actions/stale from 7 to 8 (#9)
dependabot[bot] Apr 15, 2023
87410ba
Bump com.gradle.enterprise from 3.12.5 to 3.13 (#10)
dependabot[bot] Apr 15, 2023
d41f2a6
Bump io.github.gradle-nexus.publish-plugin from 1.2.0 to 1.3.0 (#11)
dependabot[bot] Apr 15, 2023
ced6cd2
now comes zeta
lWoHvYe Apr 15, 2023
5ec30f6
coroutines 1.7.0-RC
lWoHvYe Apr 22, 2023
abb8a30
seems that dependabot is not support update version in gradle.properties
lWoHvYe Apr 25, 2023
cba6588
remove archive module
lWoHvYe Apr 25, 2023
cd903a0
蒸馍,你不扶器?
lWoHvYe Apr 28, 2023
a73daec
try exclude starter-module
lWoHvYe Apr 30, 2023
a5fd973
God Save The King!
lWoHvYe May 6, 2023
81243a9
try versionCatalogs
lWoHvYe May 7, 2023
21e7941
又菜又爱玩,还好大喜功
lWoHvYe May 11, 2023
571ef47
突然又能正常gradle run了,很奇怪
lWoHvYe May 12, 2023
524ec60
optional SSL CN verify
lWoHvYe May 13, 2023
26dd32c
4 revert: disable kotlin
lWoHvYe May 13, 2023
83d3c14
Merge remote-tracking branch 'rm-fork/main' into dev_3.x
lWoHvYe May 13, 2023
9b1c7c1
try fixed
lWoHvYe May 13, 2023
bb7bae9
try fixed
lWoHvYe May 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
花神诞祭
添加AutoConfig,解除对启动类包名的限制

(cherry picked from commit e954b81)
lWoHvYe committed Nov 6, 2022
commit db75ecc811dd4e3cc41c9ee34d02e37ab102b9d2
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2022. lWoHvYe(Hongyan Wang)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lwohvye.core.config;

import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

@ComponentScan("com.lwohvye") // 通过配置这个,启动类的路径不再限制为com.lwohvye or higher
@EnableAspectJAutoProxy // 当启动类不再higher path时,aop会失效,需要显示通过该注解开启
@EnableJpaRepositories(basePackages = {"com.lwohvye.sys.modules.*.repository","com.lwohvye.*.repository"})
@EntityScan(basePackages = {"com.lwohvye.api.modules.*.domain","com.lwohvye.*.domain"})
@EnableJpaAuditing(auditorAwareRef = "auditorAware") // 开启Jpa审计
// @EnableAutoConfiguration // A circular @Import has been detected:
public class UnicornAutoConfiguration {
}
1 change: 1 addition & 0 deletions unicorn-core/src/main/resources/META-INF/spring.factories
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Loading auto-configurations from spring.factories is deprecated. see: x.imports in /META-INF/spring
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# Copyright (c) 2022. lWoHvYe(Hongyan Wang)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# since Spring Boot 2.7 Auto-configuration Registration
com.lwohvye.core.config.UnicornAutoConfiguration
4 changes: 2 additions & 2 deletions unicorn-system/pom.xml
Original file line number Diff line number Diff line change
@@ -110,8 +110,8 @@

<!--Mysql依赖包-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<!--scope元素主要用来控制依赖的使用范围,指定当前包的依赖范围和依赖的传递性,也就是哪些依赖在哪些classpath中可用。
常见的可选值有:compile, provided, runtime, test, system等。-->
<scope>runtime</scope>
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.lwohvye
package com.unicorn

import com.lwohvye.core.annotation.RespResultBody
import com.lwohvye.core.annotation.rest.AnonymousGetMapping
@@ -50,7 +50,6 @@ import org.springframework.web.bind.annotation.RestController
// 通过exclude SecurityAutoConfiguration可以屏蔽Spring Security的相关Control,这比定一个Config然后anyRequest().permitAll()要优雅,直接exclude AutoConfig,这是之前没有想到的方法,后续在别的地方应该还会用到
//@SpringBootApplication(exclude = [SecurityAutoConfiguration::class]) // 对于默认的Config可以这样,但当已经定义了一个SecurityConfig时,通过这个是不行的,因为虽然exclude了AutoConfig,但有手动Register Bean;这种方式的可行性需进一步验证
@EnableTransactionManagement // 开启事务
@EnableJpaAuditing(auditorAwareRef = "auditorAware") // 开启Jpa审计
@EnableRetry //开启重试机制
@EnableConfigurationProperties //开启 @ConfigurationProperties 注解
@EnableLogRecord(tenant = "com.unicorn.valentineP2P")
Original file line number Diff line number Diff line change
@@ -14,9 +14,10 @@
* limitations under the License.
*/

package com.lwohvye.vs.rest;
package com.unicorn.vs.rest;

import com.lwohvye.core.annotation.RespResultBody;
import com.lwohvye.core.annotation.log.OprLog;
import com.lwohvye.core.annotation.rest.AnonymousGetMapping;
import com.lwohvye.core.utils.result.ResultInfo;
import com.lwohvye.sys.modules.infrastructure.constants.LogRecordType;
@@ -49,6 +50,7 @@ public class RsLogController {
@Value("${local.rs.iList}")
private Integer[] ints;

@OprLog("ooo")
@LogRecord(
fail = "执行失败,失败原因:「{{#_errorMsg}}」",
success = "收到请求{{#version}},执行结果:{{#_ret}}",
6 changes: 3 additions & 3 deletions valentine-starter/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -5,9 +5,9 @@
requires kotlin.stdlib;
requires kotlinx.coroutines.core.jvm;

exports com.lwohvye.vs.rest to spring.beans, spring.web;
exports com.unicorn.vs.rest to spring.beans, spring.web;

opens config; // 注意,resources目录下的子目标并没有被open,所以需要单独open,或者直接open整个module
opens com.lwohvye;
opens com.lwohvye.vs.rest to spring.core;
opens com.unicorn;
opens com.unicorn.vs.rest to spring.core;
}