Bump Spring Boot to 3.5.9, Spring Cloud to 2025.0.1 and Vaadin to 25.0.2 (#2862)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2026-01-07 08:47:21 +02:00
committed by GitHub
parent 9daf5b19e5
commit f35b12988e
4 changed files with 20 additions and 20 deletions

View File

@@ -25,7 +25,7 @@
<name>hawkBit :: UI</name>
<properties>
<vaadin.version>24.9.7</vaadin.version>
<vaadin.version>25.0.2</vaadin.version>
</properties>
<repositories>

View File

@@ -13,6 +13,7 @@ import java.util.List;
import java.util.Optional;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.HasElement;
import com.vaadin.flow.component.UI;
import com.vaadin.flow.component.Unit;
import com.vaadin.flow.component.applayout.AppLayout;
@@ -68,8 +69,8 @@ public class MainLayout extends AppLayout {
}
@Override
protected void afterNavigation() {
super.afterNavigation();
public void showRouterLayoutContent(final HasElement content) {
super.showRouterLayoutContent(content);
viewTitle.setText(
Optional.ofNullable(getContent())
.map(c -> c.getClass().getAnnotation(PageTitle.class))

View File

@@ -20,7 +20,6 @@ import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.springframework.security.authentication.AccountExpiredException;
import org.springframework.security.authentication.AnonymousAuthenticationToken;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
@@ -42,32 +41,32 @@ class UserDetailsSetter extends OncePerRequestFilter {
@SuppressWarnings("java:S1066") // java:S1066 - readability preferred
@Override
protected void doFilterInternal(@NotNull final HttpServletRequest request, @NotNull final HttpServletResponse response,
@NotNull final FilterChain filterChain)
protected void doFilterInternal(final HttpServletRequest request, final HttpServletResponse response, final FilterChain filterChain)
throws ServletException, IOException {
Authentication authentication = securityContextHolderStrategy.getContext().getAuthentication();
Authentication newAuthentication;
final Authentication authentication = securityContextHolderStrategy.getContext().getAuthentication();
final Authentication newAuthentication;
if (!(authentication instanceof AnonymousAuthenticationToken) && authentication.isAuthenticated()) {
Collection<? extends GrantedAuthority> grantedAuthorities = grantedAuthoritiesService.getGrantedAuthorities(authentication);
final Collection<? extends GrantedAuthority> grantedAuthorities = grantedAuthoritiesService.getGrantedAuthorities(authentication);
if (authentication instanceof OAuth2AuthenticationToken oAuth2AuthenticationToken) {
newAuthentication = new OAuth2AuthenticationToken(oAuth2AuthenticationToken.getPrincipal(), grantedAuthorities,
newAuthentication = new OAuth2AuthenticationToken(
oAuth2AuthenticationToken.getPrincipal(), grantedAuthorities,
oAuth2AuthenticationToken.getAuthorizedClientRegistrationId());
if (authentication.getPrincipal() instanceof OidcUser user) {
// if there is no refresh token and the access token is expired then relogin is required
// if there is no refresh token and the access token is expired then re-login is required
if (user.getIdToken().getExpiresAt() != null && Instant.now().isAfter(user.getIdToken().getExpiresAt())) {
throw new AccountExpiredException("Token expired");
}
}
} else {
newAuthentication = new UsernamePasswordAuthenticationToken(authentication.getName(), authentication.getCredentials(),
grantedAuthorities);
newAuthentication = new UsernamePasswordAuthenticationToken(
authentication.getName(), authentication.getCredentials(), grantedAuthorities);
}
securityContextHolderStrategy.getContext().setAuthentication(newAuthentication);
}
// proceed with the filter chain
filterChain.doFilter(request, response);
}
}
}

View File

@@ -17,7 +17,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.5.8</version>
<version>3.5.9</version>
</parent>
<groupId>org.eclipse.hawkbit</groupId>
@@ -56,9 +56,9 @@
<java.client.version>17</java.client.version>
<!-- must be the same as the parent version -->
<spring.boot.version>3.5.8</spring.boot.version>
<spring.cloud.version>2025.0.0</spring.cloud.version>
<springdoc-openapi.version>2.8.14</springdoc-openapi.version>
<spring.boot.version>3.5.9</spring.boot.version>
<spring.cloud.version>2025.0.1</spring.cloud.version>
<springdoc-openapi.version>2.8.15</springdoc-openapi.version>
<!-- Spring boot version overrides (should be reviewed with every Spring boot upgrade) - START -->
<!-- Newer versions needed than defined in the Spring boot -->