BAEL-614 appRunner in proper place

This commit is contained in:
Tomasz Lelek 2017-01-26 18:56:42 +01:00 committed by Andrew Morgan
parent c7203bd564
commit 3fa1b93f87
3 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
package com.baeldung.cachecontrol.app;
package com.baeldung.cachecontrol;
import org.springframework.boot.SpringApplication;

View File

@ -5,16 +5,16 @@ import com.baeldung.cachecontrol.model.TimestampDto;
import com.baeldung.cachecontrol.model.UserDto;
import org.springframework.http.CacheControl;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.concurrent.TimeUnit;
@RestController
@Controller
public class ResourceEndpoint {
@RequestMapping(value = "/users/{name}", method = RequestMethod.GET)

View File

@ -2,12 +2,14 @@ package com.baeldung.cachecontrol.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
@Override