BAEL-89 Adding test dependencies
This commit is contained in:
parent
c0e721b92e
commit
a88c500d8d
|
@ -37,6 +37,11 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
package com.baeldung.spring.session.tomcatex;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* Created by tschi on 11/12/2016.
|
||||
*/
|
||||
@RestController
|
||||
public class TestController {
|
||||
@RequestMapping
|
||||
public String helloJetty() {
|
||||
return "hello Jetty";
|
||||
}
|
||||
}
|
|
@ -14,7 +14,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
auth.inMemoryAuthentication()
|
||||
.withUser("user").password("password").roles("USER").and()
|
||||
.withUser("admin").password("password").roles("ADMIN");
|
||||
}
|
||||
|
||||
|
@ -23,8 +22,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||
http
|
||||
.httpBasic().and()
|
||||
.authorizeRequests()
|
||||
.antMatchers("/").permitAll()
|
||||
.antMatchers("/tomcat").hasRole("USER")
|
||||
.antMatchers("/tomcat/admin").hasRole("ADMIN")
|
||||
.anyRequest().authenticated();
|
||||
}
|
||||
|
|
|
@ -5,17 +5,6 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
|
||||
@RestController
|
||||
public class TestController {
|
||||
|
||||
@RequestMapping
|
||||
public String helloDefault() {
|
||||
return "hello default";
|
||||
}
|
||||
|
||||
@RequestMapping("/tomcat")
|
||||
public String helloTomcat() {
|
||||
return "hello tomcat";
|
||||
}
|
||||
|
||||
@RequestMapping("/tomcat/admin")
|
||||
public String helloTomcatAdmin() {
|
||||
return "hello tomcat admin";
|
||||
|
|
Loading…
Reference in New Issue