Skip to content

Commit a88c500

Browse files
committed
BAEL-89 Adding test dependencies
1 parent c0e721b commit a88c500

4 files changed

Lines changed: 5 additions & 29 deletions

File tree

‎spring-session/jetty-session-demo/pom.xml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
<groupId>org.springframework.boot</groupId>
3838
<artifactId>spring-boot-starter-web</artifactId>
3939
</dependency>
40+
<dependency>
41+
<groupId>org.springframework.boot</groupId>
42+
<artifactId>spring-boot-starter-test</artifactId>
43+
<scope>test</scope>
44+
</dependency>
4045
</dependencies>
4146

4247
<dependencyManagement>

‎spring-session/jetty-session-demo/src/main/java/com/baeldung/spring/session/tomcatex/TestController.java‎

Lines changed: 0 additions & 15 deletions
This file was deleted.

‎spring-session/tomcat-session-demo/src/main/java/com/baeldung/spring/session/tomcatex/SecurityConfig.java‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
1414
@Autowired
1515
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
1616
auth.inMemoryAuthentication()
17-
.withUser("user").password("password").roles("USER").and()
1817
.withUser("admin").password("password").roles("ADMIN");
1918
}
2019

@@ -23,8 +22,6 @@ protected void configure(HttpSecurity http) throws Exception {
2322
http
2423
.httpBasic().and()
2524
.authorizeRequests()
26-
.antMatchers("/").permitAll()
27-
.antMatchers("/tomcat").hasRole("USER")
2825
.antMatchers("/tomcat/admin").hasRole("ADMIN")
2926
.anyRequest().authenticated();
3027
}

‎spring-session/tomcat-session-demo/src/main/java/com/baeldung/spring/session/tomcatex/TestController.java‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@
55

66
@RestController
77
public class TestController {
8-
9-
@RequestMapping
10-
public String helloDefault() {
11-
return "hello default";
12-
}
13-
14-
@RequestMapping("/tomcat")
15-
public String helloTomcat() {
16-
return "hello tomcat";
17-
}
18-
198
@RequestMapping("/tomcat/admin")
209
public String helloTomcatAdmin() {
2110
return "hello tomcat admin";

0 commit comments

Comments
 (0)