security cleanup
This commit is contained in:
parent
6ffd867e11
commit
af424e266b
@ -1,4 +1,4 @@
|
||||
package org.baeldung.spring.web.config;
|
||||
package org.baeldung.spring.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
@ -1,4 +1,4 @@
|
||||
package org.baeldung.spring.web.config;
|
||||
package org.baeldung.spring.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.ImportResource;
|
@ -1,4 +1,4 @@
|
||||
package org.baeldung.spring.web.config;
|
||||
package org.baeldung.spring.config;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
@ -1,28 +0,0 @@
|
||||
package org.baeldung.spring.web.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
@Controller
|
||||
public class TestController {
|
||||
|
||||
public TestController() {
|
||||
super();
|
||||
}
|
||||
|
||||
// API
|
||||
|
||||
@RequestMapping("/permitAll")
|
||||
@ResponseBody
|
||||
public String permitAll() {
|
||||
return "Permit All";
|
||||
}
|
||||
|
||||
@RequestMapping("/securityNone")
|
||||
@ResponseBody
|
||||
public String securityNone() {
|
||||
return "Security None";
|
||||
}
|
||||
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
package org.baeldung.spring.web.controller;
|
||||
package org.baeldung.web.controller;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.baeldung.spring.web.Foo;
|
||||
import org.baeldung.web.dto.Foo;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
@ -0,0 +1,28 @@
|
||||
package org.baeldung.web.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
@Controller
|
||||
public class TestController {
|
||||
|
||||
public TestController() {
|
||||
super();
|
||||
}
|
||||
|
||||
// API
|
||||
|
||||
@RequestMapping("/permitAll")
|
||||
@ResponseBody
|
||||
public String permitAll() {
|
||||
return "Permit All";
|
||||
}
|
||||
|
||||
@RequestMapping("/securityNone")
|
||||
@ResponseBody
|
||||
public String securityNone() {
|
||||
return "Security None";
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package org.baeldung.spring.web;
|
||||
package org.baeldung.web.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -21,7 +21,7 @@
|
||||
<authentication-provider>
|
||||
<user-service>
|
||||
<user name="temporary" password="temporary" authorities="ROLE_ADMIN" />
|
||||
<user name="user" password="user" authorities="ROLE_USER" />
|
||||
<user name="user" password="userPass" authorities="ROLE_USER" />
|
||||
</user-service>
|
||||
</authentication-provider>
|
||||
</authentication-manager>
|
||||
|
Loading…
x
Reference in New Issue
Block a user