Skip to content

Commit 10b214f

Browse files
committed
upgraded to spring boot 3.2.1 and jwt 0.12.3
1 parent 297f3f2 commit 10b214f

File tree

9 files changed

+74
-9
lines changed

9 files changed

+74
-9
lines changed

.idea/.gitignore

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>3.0.0</version>
8+
<version>3.2.1</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
1111
<groupId>com.springboot.blog</groupId>
@@ -33,8 +33,8 @@
3333
<optional>true</optional>
3434
</dependency>
3535
<dependency>
36-
<groupId>mysql</groupId>
37-
<artifactId>mysql-connector-java</artifactId>
36+
<groupId>com.mysql</groupId>
37+
<artifactId>mysql-connector-j</artifactId>
3838
<scope>runtime</scope>
3939
</dependency>
4040
<dependency>
@@ -66,20 +66,20 @@
6666
<dependency>
6767
<groupId>io.jsonwebtoken</groupId>
6868
<artifactId>jjwt-impl</artifactId>
69-
<version>0.11.5</version>
69+
<version>0.12.3</version>
7070
<scope>runtime</scope>
7171
</dependency>
7272
<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-api -->
7373
<dependency>
7474
<groupId>io.jsonwebtoken</groupId>
7575
<artifactId>jjwt-api</artifactId>
76-
<version>0.11.5</version>
76+
<version>0.12.3</version>
7777
</dependency>
7878
<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-jackson -->
7979
<dependency>
8080
<groupId>io.jsonwebtoken</groupId>
8181
<artifactId>jjwt-jackson</artifactId>
82-
<version>0.11.5</version>
82+
<version>0.12.3</version>
8383
<scope>runtime</scope>
8484
</dependency>
8585
<!-- https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-starter-webmvc-ui -->

src/main/java/com/springboot/blog/config/SecurityConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public AuthenticationManager authenticationManager(AuthenticationConfiguration c
5959
@Bean
6060
SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
6161

62-
http.csrf().disable()
62+
http.csrf(csrf -> csrf.disable())
6363
.authorizeHttpRequests((authorize) ->
6464
//authorize.anyRequest().authenticated()
6565
authorize.requestMatchers(HttpMethod.GET, "/api/**").permitAll()

src/main/java/com/springboot/blog/security/JwtTokenProvider.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private Key key(){
4646

4747
// get username from Jwt token
4848
public String getUsername(String token){
49-
Claims claims = Jwts.parserBuilder()
49+
Claims claims = Jwts.parser()
5050
.setSigningKey(key())
5151
.build()
5252
.parseClaimsJws(token)
@@ -58,7 +58,7 @@ public String getUsername(String token){
5858
// validate Jwt token
5959
public boolean validateToken(String token){
6060
try{
61-
Jwts.parserBuilder()
61+
Jwts.parser()
6262
.setSigningKey(key())
6363
.build()
6464
.parse(token);

0 commit comments

Comments
 (0)