Added extra endpoint for default caching
This commit is contained in:
@@ -17,6 +17,11 @@ import java.util.concurrent.TimeUnit;
|
||||
@Controller
|
||||
public class ResourceEndpoint {
|
||||
|
||||
@RequestMapping(value = "/default/users/{name}", method = RequestMethod.GET)
|
||||
public ResponseEntity<UserDto> getUserWithDefaultCaching(@PathVariable(value = "name") String name) {
|
||||
return ResponseEntity.ok(new UserDto(name));
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/users/{name}", method = RequestMethod.GET)
|
||||
public ResponseEntity<UserDto> getUser(@PathVariable(value = "name") String name) {
|
||||
return ResponseEntity.ok()
|
||||
@@ -24,7 +29,6 @@ public class ResourceEndpoint {
|
||||
.body(new UserDto(name));
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/timestamp", method = RequestMethod.GET)
|
||||
public ResponseEntity<TimestampDto> getServerTimestamp() {
|
||||
return ResponseEntity.ok()
|
||||
|
||||
@@ -13,9 +13,5 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
|
||||
public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.headers()
|
||||
.defaultsDisabled()
|
||||
.cacheControl();
|
||||
}
|
||||
protected void configure(HttpSecurity http) throws Exception {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user