Skip to content

Commit 629e1ed

Browse files
authored
Update spring boot dependencies to latest possible (#946)
1 parent d30c659 commit 629e1ed

File tree

6 files changed

+25
-19
lines changed

6 files changed

+25
-19
lines changed

app/build.gradle

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ buildscript {
33
mavenCentral()
44
}
55
dependencies {
6-
classpath "org.springframework.boot:spring-boot-gradle-plugin:3.4.1"
6+
classpath "org.springframework.boot:spring-boot-gradle-plugin:3.5.6"
77
}
88
}
99

1010
plugins {
1111
id "java"
12-
id "org.springframework.boot" version "3.4.1"
12+
id "org.springframework.boot" version "3.5.6"
1313
id "io.spring.dependency-management" version "1.1.7"
1414
id "com.diffplug.spotless" version "6.25.0"
1515
}
@@ -38,32 +38,32 @@ dependencies {
3838
"org.postgresql:postgresql:42.7.3",
3939

4040
// Spring Boot
41-
"org.springframework.boot:spring-boot:3.4.1",
42-
"org.springframework.boot:spring-boot-autoconfigure:3.4.1",
43-
"org.springframework.boot:spring-boot-starter-data-jpa:3.4.1",
44-
"org.springframework.boot:spring-boot-starter-security:3.4.1",
45-
"org.springframework.boot:spring-boot-starter-validation:3.4.1",
46-
"org.springframework.boot:spring-boot-starter-web:3.4.1",
47-
"org.springframework.boot:spring-boot-starter-oauth2-authorization-server:3.4.1",
41+
"org.springframework.boot:spring-boot:3.5.6",
42+
"org.springframework.boot:spring-boot-autoconfigure:3.5.6",
43+
"org.springframework.boot:spring-boot-starter-data-jpa:3.5.2",
44+
"org.springframework.boot:spring-boot-starter-security:3.5.6",
45+
"org.springframework.boot:spring-boot-starter-validation:3.5.6",
46+
"org.springframework.boot:spring-boot-starter-web:3.5.6",
47+
"org.springframework.boot:spring-boot-starter-oauth2-authorization-server:3.5.6",
4848

4949
// Spring session
50-
"org.springframework.session:spring-session-core:3.4.1",
51-
"org.springframework.session:spring-session-data-redis:3.4.1",
50+
"org.springframework.session:spring-session-core:3.5.2",
51+
"org.springframework.session:spring-session-data-redis:3.5.2",
5252

5353
// Redis
54-
"org.springframework.data:spring-data-redis:3.4.1",
54+
"org.springframework.data:spring-data-redis:3.5.5",
5555
)
5656

5757
runtimeOnly(
5858
// FlywayDB (Database migration)
5959
"org.flywaydb:flyway-core:9.21.0",
6060

6161
// Spring Boot
62-
"org.springframework.boot:spring-boot-devtools:3.4.1",
63-
"org.springframework.boot:spring-boot-starter-data-redis:3.4.1",
62+
"org.springframework.boot:spring-boot-devtools:3.5.6",
63+
"org.springframework.boot:spring-boot-starter-data-redis:3.5.6",
6464

6565
// Thymeleaf
66-
"org.springframework.boot:spring-boot-starter-thymeleaf:3.4.1",
66+
"org.springframework.boot:spring-boot-starter-thymeleaf:3.5.6",
6767
"org.thymeleaf.extras:thymeleaf-extras-springsecurity6:3.1.2.RELEASE",
6868

6969
// web dependencies

app/src/main/java/it/chalmers/gamma/adapter/primary/web/HomeController.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@ public ModelAndView editPassword(
164164
new MeFacade.UpdatePassword(
165165
form.currentPassword, form.newPassword, form.confirmNewPassword));
166166
}
167-
} catch (IllegalArgumentException | MeFacade.NewPasswordNotConfirmedException e) {
167+
} catch (IllegalArgumentException e) {
168+
bindingResult.addError(new FieldError("form", "newPassword", e.getMessage()));
169+
} catch (MeFacade.NewPasswordNotConfirmedException e) {
168170
bindingResult.addError(
169171
new FieldError("form", "confirmNewPassword", "Passwords were not the same"));
170172
} catch (MeFacade.PasswordIncorrectException e) {

app/src/main/java/it/chalmers/gamma/app/Tokens.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ public final class Tokens {
99
private Tokens() {}
1010

1111
public static String generate(int length, CharacterTypes... types) {
12+
if (length > 72) {
13+
throw new IllegalArgumentException("length must be less than 72");
14+
}
15+
1216
String characters =
1317
Arrays.stream(types).map(CharacterTypes::getCharacters).collect(Collectors.joining());
1418
SecureRandom rand = new SecureRandom();

app/src/main/java/it/chalmers/gamma/app/user/activation/domain/UserActivationToken.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ public record UserActivationToken(String value) {
1212
}
1313

1414
public static UserActivationToken generate() {
15-
return new UserActivationToken(Tokens.generate(100, UPPERCASE, NUMBERS, LOWERCASE));
15+
return new UserActivationToken(Tokens.generate(72, UPPERCASE, NUMBERS, LOWERCASE));
1616
}
1717
}

app/src/main/java/it/chalmers/gamma/app/user/passwordreset/domain/PasswordResetToken.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ public record PasswordResetToken(String value) {
1212
}
1313

1414
public static PasswordResetToken generate() {
15-
return new PasswordResetToken(Tokens.generate(100, UPPERCASE, NUMBERS, LOWERCASE));
15+
return new PasswordResetToken(Tokens.generate(72, UPPERCASE, NUMBERS, LOWERCASE));
1616
}
1717
}

app/src/main/java/it/chalmers/gamma/bootstrap/EnsureAnAdminUserBootstrap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void ensureAnAdminUser() {
6363
} else {
6464
password =
6565
Tokens.generate(
66-
75,
66+
72,
6767
Tokens.CharacterTypes.LOWERCASE,
6868
Tokens.CharacterTypes.UPPERCASE,
6969
Tokens.CharacterTypes.NUMBERS);

0 commit comments

Comments
 (0)