[JAVA-961] Standardize packages in spring-security-modules: spring-security-rest

This commit is contained in:
dupirefr 2020-03-19 21:25:10 +01:00
parent a12f9e878a
commit b993d0762d
27 changed files with 45 additions and 46 deletions

View File

@ -1,4 +1,4 @@
package org.baeldung.errorhandling;
package com.baeldung.errorhandling;
import java.util.Arrays;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.persistence.model;
package com.baeldung.persistence.model;
import java.io.Serializable;

View File

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

View File

@ -1,4 +1,4 @@
package org.baeldung.security;
package com.baeldung.security;
import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer;

View File

@ -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;

View File

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

View File

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

View File

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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,4 @@
package org.baeldung.web.error;
package com.baeldung.web.error;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.DataIntegrityViolationException;

View File

@ -1,4 +1,4 @@
package org.baeldung.web.exception;
package com.baeldung.web.exception;
public final class MyResourceNotFoundException extends RuntimeException {

View File

@ -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" />

View File

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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

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