[JAVA-961] Standardize packages in spring-security-modules: spring-security-rest
This commit is contained in:
parent
a12f9e878a
commit
b993d0762d
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.errorhandling;
|
||||
package com.baeldung.errorhandling;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.errorhandling;
|
||||
package com.baeldung.errorhandling;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.persistence.model;
|
||||
package com.baeldung.persistence.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package org.baeldung.security;
|
||||
package com.baeldung.security;
|
||||
|
||||
import org.baeldung.security.web.MySavedRequestAwareAuthenticationSuccessHandler;
|
||||
import org.baeldung.security.web.RestAuthenticationEntryPoint;
|
||||
import org.baeldung.web.error.CustomAccessDeniedHandler;
|
||||
import com.baeldung.security.web.MySavedRequestAwareAuthenticationSuccessHandler;
|
||||
import com.baeldung.security.web.RestAuthenticationEntryPoint;
|
||||
import com.baeldung.web.error.CustomAccessDeniedHandler;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
@ -20,7 +20,7 @@ import org.springframework.security.web.authentication.SimpleUrlAuthenticationFa
|
|||
@Configuration
|
||||
@EnableWebSecurity
|
||||
@EnableGlobalMethodSecurity(prePostEnabled = true)
|
||||
@ComponentScan("org.baeldung.security")
|
||||
@ComponentScan("com.baeldung.security")
|
||||
public class SecurityJavaConfig extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Autowired
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.security;
|
||||
package com.baeldung.security;
|
||||
|
||||
import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.security.web;
|
||||
package com.baeldung.security.web;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.security.web;
|
||||
package com.baeldung.security.web;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring;
|
||||
package com.baeldung.spring;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
|
@ -1,10 +1,10 @@
|
|||
package org.baeldung.spring;
|
||||
package com.baeldung.spring;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
// @Configuration
|
||||
// @ImportResource({ "classpath:webSecurityConfig.xml" })
|
||||
@ComponentScan("org.baeldung.security")
|
||||
@ComponentScan("com.baeldung.security")
|
||||
public class SecurityXmlConfig {
|
||||
|
||||
public SecurityXmlConfig() {
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring;
|
||||
package com.baeldung.spring;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
@ -12,7 +12,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|||
import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan("org.baeldung.web")
|
||||
@ComponentScan("com.baeldung.web")
|
||||
@EnableWebMvc
|
||||
@EnableAsync
|
||||
public class WebConfig implements WebMvcConfigurer {
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.swagger2;
|
||||
package com.baeldung.swagger2;
|
||||
|
||||
import static com.google.common.collect.Lists.newArrayList;
|
||||
|
||||
|
@ -25,7 +25,7 @@ public class SwaggerConfig {
|
|||
@Bean
|
||||
public Docket api() {
|
||||
return new Docket(DocumentationType.SWAGGER_2).select()
|
||||
.apis(RequestHandlerSelectors.basePackage("org.baeldung.web.controller"))
|
||||
.apis(RequestHandlerSelectors.basePackage("com.baeldung.web.controller"))
|
||||
.paths(PathSelectors.ant("/foos/*"))
|
||||
.build()
|
||||
.apiInfo(apiInfo())
|
|
@ -1,11 +1,11 @@
|
|||
package org.baeldung.web.controller;
|
||||
package com.baeldung.web.controller;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.baeldung.web.service.AsyncService;
|
||||
import com.baeldung.web.service.AsyncService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.stereotype.Controller;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.controller;
|
||||
package com.baeldung.web.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.controller;
|
||||
package com.baeldung.web.controller;
|
||||
|
||||
import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
|
||||
|
||||
|
@ -6,7 +6,7 @@ import java.util.List;
|
|||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
import com.baeldung.persistence.model.Foo;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.controller;
|
||||
package com.baeldung.web.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.error;
|
||||
package com.baeldung.web.error;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.error;
|
||||
package com.baeldung.web.error;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.dao.DataIntegrityViolationException;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.exception;
|
||||
package com.baeldung.web.exception;
|
||||
|
||||
public final class MyResourceNotFoundException extends RuntimeException {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.service;
|
||||
package com.baeldung.web.service;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.service;
|
||||
package com.baeldung.web.service;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
</http>
|
||||
|
||||
<beans:bean id="mySuccessHandler"
|
||||
class="org.baeldung.security.MySavedRequestAwareAuthenticationSuccessHandler" />
|
||||
class="com.baeldung.security.MySavedRequestAwareAuthenticationSuccessHandler" />
|
||||
<beans:bean id="myFailureHandler"
|
||||
class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler" />
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</context-param>
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>org.baeldung.spring</param-value>
|
||||
<param-value>com.baeldung.spring</param-value>
|
||||
</context-param>
|
||||
|
||||
<listener>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.baeldung;
|
||||
package com.baeldung;
|
||||
|
||||
import org.baeldung.security.SecurityJavaConfig;
|
||||
import org.baeldung.spring.ClientWebConfig;
|
||||
import org.baeldung.spring.WebConfig;
|
||||
import com.baeldung.security.SecurityJavaConfig;
|
||||
import com.baeldung.spring.ClientWebConfig;
|
||||
import com.baeldung.spring.WebConfig;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
|
@ -1,10 +1,9 @@
|
|||
package org.baeldung.errorhandling;
|
||||
package com.baeldung.errorhandling;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.baeldung.errorhandling.ApiError;
|
||||
import org.baeldung.web.TestConfig;
|
||||
import com.baeldung.web.TestConfig;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.http.HttpStatus;
|
|
@ -1,9 +1,9 @@
|
|||
package org.baeldung.web;
|
||||
package com.baeldung.web;
|
||||
|
||||
import org.baeldung.security.SecurityJavaConfig;
|
||||
import org.baeldung.spring.ClientWebConfig;
|
||||
import org.baeldung.spring.WebConfig;
|
||||
import org.baeldung.web.controller.AsyncController;
|
||||
import com.baeldung.security.SecurityJavaConfig;
|
||||
import com.baeldung.spring.ClientWebConfig;
|
||||
import com.baeldung.spring.WebConfig;
|
||||
import com.baeldung.web.controller.AsyncController;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web;
|
||||
package com.baeldung.web;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web;
|
||||
package com.baeldung.web;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
@ -7,7 +7,7 @@ import org.springframework.web.multipart.MultipartResolver;
|
|||
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan({ "org.baeldung.web" })
|
||||
@ComponentScan({ "com.baeldung.web" })
|
||||
public class TestConfig {
|
||||
|
||||
@Bean
|
Loading…
Reference in New Issue