File tree Expand file tree Collapse file tree 13 files changed +49
-13
lines changed
simple-jwt-spring-boot-starter
src/main/java/cn/org/codecrafters/simplejwt/autoconfiguration Expand file tree Collapse file tree 13 files changed +49
-13
lines changed Original file line number Diff line number Diff line change 2323 <parent >
2424 <groupId >cn.org.codecrafters</groupId >
2525 <artifactId >jdevkit</artifactId >
26- <version >1.0.0 </version >
26+ <version >1.0.1 </version >
2727 </parent >
2828
2929 <artifactId >devkit-core</artifactId >
Original file line number Diff line number Diff line change 66 <parent >
77 <groupId >cn.org.codecrafters</groupId >
88 <artifactId >jdevkit</artifactId >
9- <version >1.0.0 </version >
9+ <version >1.0.1 </version >
1010 </parent >
1111
1212 <artifactId >devkit-utils</artifactId >
Original file line number Diff line number Diff line change 2323 <parent >
2424 <groupId >cn.org.codecrafters</groupId >
2525 <artifactId >jdevkit</artifactId >
26- <version >1.0.0 </version >
26+ <version >1.0.1 </version >
2727 </parent >
2828
2929 <artifactId >guid</artifactId >
Original file line number Diff line number Diff line change 2929
3030 <groupId >cn.org.codecrafters</groupId >
3131 <artifactId >jdevkit</artifactId >
32- <version >1.0.0 </version >
32+ <version >1.0.1 </version >
3333 <inceptionYear >2023</inceptionYear >
3434
3535 <packaging >pom</packaging >
Original file line number Diff line number Diff line change 2323 <parent >
2424 <groupId >cn.org.codecrafters</groupId >
2525 <artifactId >jdevkit</artifactId >
26- <version >1.0.0 </version >
26+ <version >1.0.1 </version >
2727 </parent >
2828
2929 <artifactId >simple-jwt-authzero</artifactId >
Original file line number Diff line number Diff line change 2323 <parent >
2424 <groupId >cn.org.codecrafters</groupId >
2525 <artifactId >jdevkit</artifactId >
26- <version >1.0.0 </version >
26+ <version >1.0.1 </version >
2727 </parent >
2828
2929 <artifactId >simple-jwt-facade</artifactId >
Original file line number Diff line number Diff line change 2323 <parent >
2424 <groupId >cn.org.codecrafters</groupId >
2525 <artifactId >jdevkit</artifactId >
26- <version >1.0.0 </version >
26+ <version >1.0.1 </version >
2727 </parent >
2828
2929 <artifactId >simple-jwt-jjwt</artifactId >
Original file line number Diff line number Diff line change 2323 <parent >
2424 <groupId >cn.org.codecrafters</groupId >
2525 <artifactId >jdevkit</artifactId >
26- <version >1.0.0 </version >
26+ <version >1.0.1 </version >
2727 </parent >
2828
2929 <artifactId >simple-jwt-spring-boot-starter</artifactId >
Original file line number Diff line number Diff line change 2525import lombok .extern .slf4j .Slf4j ;
2626import org .springframework .beans .factory .annotation .Autowired ;
2727import org .springframework .boot .autoconfigure .AutoConfiguration ;
28+ import org .springframework .boot .autoconfigure .AutoConfigureAfter ;
2829import org .springframework .boot .autoconfigure .condition .ConditionalOnBean ;
2930import org .springframework .boot .autoconfigure .condition .ConditionalOnClass ;
3031import org .springframework .boot .autoconfigure .condition .ConditionalOnMissingBean ;
3132import org .springframework .boot .context .properties .EnableConfigurationProperties ;
3233import org .springframework .context .annotation .Bean ;
34+ import org .springframework .context .annotation .DependsOn ;
3335
3436/**
3537 * <p>
6163@ EnableConfigurationProperties (value = {SimpleJwtProperties .class })
6264@ ConditionalOnClass ({DecodedJWT .class , AuthzeroTokenResolver .class })
6365@ ConditionalOnMissingBean ({TokenResolver .class })
66+ @ ConditionalOnBean (value = {GuidCreator .class }, name = "jtiCreator" )
67+ @ AutoConfigureAfter (value = GuidAutoConfiguration .class )
6468public class AuthzeroTokenResolverAutoConfiguration {
6569
6670 /**
@@ -96,7 +100,6 @@ public AuthzeroTokenResolverAutoConfiguration(SimpleJwtProperties simpleJwtPrope
96100 * @return the {@link TokenResolver} instance
97101 */
98102 @ Bean
99- @ ConditionalOnBean (value = {GuidCreator .class }, name = "jtiCreator" )
100103 public TokenResolver <DecodedJWT > tokenResolver () {
101104 return new AuthzeroTokenResolver (
102105 jtiCreator ,
Original file line number Diff line number Diff line change 1818package cn .org .codecrafters .simplejwt .autoconfiguration ;
1919
2020import cn .org .codecrafters .guid .GuidCreator ;
21+ import cn .org .codecrafters .simplejwt .autoconfiguration .conditions .GuidCreatorCondition ;
2122import lombok .extern .slf4j .Slf4j ;
2223import org .springframework .boot .autoconfigure .AutoConfiguration ;
2324import org .springframework .boot .autoconfigure .condition .ConditionalOnMissingBean ;
25+ import org .springframework .boot .autoconfigure .condition .SearchStrategy ;
2426import org .springframework .context .annotation .Bean ;
27+ import org .springframework .context .annotation .Conditional ;
2528
2629import java .util .UUID ;
2730
3235 */
3336@ Slf4j
3437@ AutoConfiguration
35- @ ConditionalOnMissingBean (value = GuidCreator .class , name = "jtiCreator" )
3638public class GuidAutoConfiguration {
3739
3840 @ Bean
41+ @ Conditional (GuidCreatorCondition .class )
3942 public GuidCreator <?> jtiCreator () {
4043 return UUID ::randomUUID ;
4144 }
You can’t perform that action at this time.
0 commit comments