Skip to content

Commit 764ab1d

Browse files
mrtssvenzik
authored andcommitted
Clean up pom.xml
WE2-860 Signed-off-by: Mart Somermaa <[email protected]>
1 parent a0f578f commit 764ab1d

File tree

2 files changed

+9
-28
lines changed

2 files changed

+9
-28
lines changed

example/pom.xml

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>3.1.9</version>
8+
<version>3.2.4</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
11-
<groupId>org.webeid.example</groupId>
11+
<groupId>eu.webeid.example</groupId>
1212
<artifactId>web-eid-springboot-example</artifactId>
1313
<version>3.0.0-SNAPSHOT</version>
1414
<name>web-eid-springboot-example</name>
15-
<description>Example Spring Boot project that demonstrates how to use Web eID for authentication and digital
15+
<description>Example Spring Boot application that demonstrates how to use Web eID for authentication and digital
1616
signing
1717
</description>
1818

1919
<properties>
2020
<java.version>17</java.version>
21-
<maven-surefire-plugin.version>2.22.1</maven-surefire-plugin.version>
22-
<webeid.version>3.0.0</webeid.version>
21+
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
22+
<webeid.version>3.0.1</webeid.version>
2323
<digidoc4j.version>5.3.0</digidoc4j.version>
2424
<jmockit.version>1.44</jmockit.version>
2525
</properties>
@@ -31,20 +31,12 @@
3131
</dependency>
3232
<dependency>
3333
<groupId>org.springframework.boot</groupId>
34-
<artifactId>spring-boot-starter-validation</artifactId>
34+
<artifactId>spring-boot-starter-security</artifactId>
3535
</dependency>
3636
<dependency>
3737
<groupId>org.springframework.boot</groupId>
3838
<artifactId>spring-boot-starter-thymeleaf</artifactId>
3939
</dependency>
40-
<dependency>
41-
<groupId>org.springframework.boot</groupId>
42-
<artifactId>spring-boot-starter-security</artifactId>
43-
</dependency>
44-
<dependency>
45-
<groupId>org.springframework.security</groupId>
46-
<artifactId>spring-security-config</artifactId>
47-
</dependency>
4840

4941
<dependency>
5042
<groupId>org.digidoc4j</groupId>
@@ -57,22 +49,10 @@
5749
<version>${webeid.version}</version>
5850
</dependency>
5951

60-
<dependency>
61-
<groupId>org.springframework.boot</groupId>
62-
<artifactId>spring-boot-devtools</artifactId>
63-
<optional>true</optional>
64-
</dependency>
65-
6652
<dependency>
6753
<groupId>org.springframework.boot</groupId>
6854
<artifactId>spring-boot-starter-test</artifactId>
6955
<scope>test</scope>
70-
<exclusions>
71-
<exclusion>
72-
<groupId>org.junit.vintage</groupId>
73-
<artifactId>junit-vintage-engine</artifactId>
74-
</exclusion>
75-
</exclusions>
7656
</dependency>
7757
<dependency>
7858
<groupId>org.springframework.security</groupId>

example/src/main/java/eu/webeid/example/web/WelcomeController.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
import org.springframework.ui.Model;
3030
import org.springframework.web.bind.annotation.GetMapping;
3131

32-
import jakarta.validation.constraints.NotNull;
3332
import java.security.Principal;
33+
import java.util.Objects;
3434

3535
import static eu.webeid.example.security.AuthTokenDTOAuthenticationProvider.ROLE_USER;
3636

@@ -40,7 +40,8 @@ public class WelcomeController {
4040

4141
@PreAuthorize("hasAuthority('" + ROLE_USER + "')")
4242
@GetMapping("welcome")
43-
public String welcome(Model model, @NotNull Principal principal) {
43+
public String welcome(Model model, Principal principal) {
44+
Objects.requireNonNull(principal);
4445
LOG.info("Showing welcome page, logged in as principal={}", principal.getName());
4546
model.addAttribute("principalName", principal.getName());
4647
return "welcome";

0 commit comments

Comments
 (0)