Added extra endpoint for default caching

This commit is contained in:
Andrew Morgan
2017-02-04 23:46:53 +00:00
parent c9394b216a
commit 3f81460e90
3 changed files with 37 additions and 11 deletions

View File

@@ -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()

View File

@@ -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 {}
}