BAEL-614 appRunner in proper place
This commit is contained in:
parent
c7203bd564
commit
3fa1b93f87
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.cachecontrol.app;
|
||||
package com.baeldung.cachecontrol;
|
||||
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue