Merge pull request #8921 from dupirefr/team/JAVA-961-standardize_packages_in_spring_security_modules-part_2

[JAVA-961] standardize packages in spring security modules - Part 2
This commit is contained in:
Josh Cummings 2020-03-26 11:05:55 -06:00 committed by GitHub
commit 1807233610
160 changed files with 247 additions and 247 deletions

View File

@ -1,4 +1,4 @@
package org.baeldung.acl;
package com.baeldung.acl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -1,4 +1,4 @@
package org.baeldung.acl.config;
package com.baeldung.acl.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

View File

@ -1,4 +1,4 @@
package org.baeldung.acl.config;
package com.baeldung.acl.config;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Configuration;
@ -8,9 +8,9 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@Configuration
@EnableTransactionManagement
@EnableJpaRepositories(basePackages = "org.baeldung.acl.persistence.dao")
@PropertySource("classpath:org.baeldung.acl.datasource.properties")
@EntityScan(basePackages={ "org.baeldung.acl.persistence.entity" })
@EnableJpaRepositories(basePackages = "com.baeldung.acl.persistence.dao")
@PropertySource("classpath:com.baeldung.acl.datasource.properties")
@EntityScan(basePackages={ "com.baeldung.acl.persistence.entity" })
public class JPAPersistenceConfig {
}

View File

@ -1,8 +1,8 @@
package org.baeldung.acl.persistence.dao;
package com.baeldung.acl.persistence.dao;
import java.util.List;
import org.baeldung.acl.persistence.entity.NoticeMessage;
import com.baeldung.acl.persistence.entity.NoticeMessage;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.security.access.prepost.PostAuthorize;

View File

@ -1,4 +1,4 @@
package org.baeldung.acl.persistence.entity;
package com.baeldung.acl.persistence.entity;
import javax.persistence.Column;
import javax.persistence.Entity;

View File

@ -4,7 +4,7 @@ INSERT INTO acl_sid (id, principal, sid) VALUES
(3, 0, 'ROLE_EDITOR');
INSERT INTO acl_class (id, class) VALUES
(1, 'org.baeldung.acl.persistence.entity.NoticeMessage');
(1, 'com.baeldung.acl.persistence.entity.NoticeMessage');
INSERT INTO system_message(id,content) VALUES
(1,'First Level Message'),

View File

@ -1,6 +1,6 @@
package org.baeldung;
package com.baeldung;
import org.baeldung.acl.Application;
import com.baeldung.acl.Application;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;

View File

@ -1,12 +1,12 @@
package org.baeldung.acl;
package com.baeldung.acl;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.util.List;
import org.baeldung.acl.persistence.dao.NoticeMessageRepository;
import org.baeldung.acl.persistence.entity.NoticeMessage;
import com.baeldung.acl.persistence.dao.NoticeMessageRepository;
import com.baeldung.acl.persistence.entity.NoticeMessage;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@ -39,7 +39,7 @@ public class SpringACLIntegrationTest extends AbstractJUnit4SpringContextTests{
private static String EDITTED_CONTENT = "EDITED";
@Configuration
@ComponentScan("org.baeldung.acl.*")
@ComponentScan("com.baeldung.acl.*")
public static class SpringConfig {
}

View File

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

View File

@ -1,6 +1,6 @@
package org.baeldung.config;
package com.baeldung.config;
import org.baeldung.security.DummyUserDetailsService;
import com.baeldung.security.DummyUserDetailsService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.FileSystemResource;

View File

@ -1,4 +1,4 @@
package org.baeldung.security;
package com.baeldung.security;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.userdetails.User;

View File

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

View File

@ -1,4 +1,4 @@
package org.baeldung.controller;
package com.baeldung.controller;
import java.security.Principal;
import java.util.Arrays;

View File

@ -1,4 +1,4 @@
package org.baeldung.security;
package com.baeldung.security;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;

View File

@ -1,5 +1,6 @@
package org.baeldung;
package com.baeldung;
import com.baeldung.SampleLDAPApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;

View File

@ -1,8 +1,8 @@
package org.baeldung.spring;
package com.baeldung.spring;
import org.baeldung.web.interceptor.LoggerInterceptor;
import org.baeldung.web.interceptor.SessionTimerInterceptor;
import org.baeldung.web.interceptor.UserInterceptor;
import com.baeldung.web.interceptor.LoggerInterceptor;
import com.baeldung.web.interceptor.SessionTimerInterceptor;
import com.baeldung.web.interceptor.UserInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@ -16,7 +16,7 @@ import org.springframework.web.servlet.view.JstlView;
@EnableWebMvc
@Configuration
@ComponentScan("org.baeldung.web.controller")
@ComponentScan("com.baeldung.web.controller")
public class MvcConfig implements WebMvcConfigurer {
public MvcConfig() {

View File

@ -1,4 +1,4 @@
package org.baeldung.spring;
package com.baeldung.spring;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;

View File

@ -1,6 +1,7 @@
package org.baeldung.spring;
package com.baeldung.spring;
import org.baeldung.security.MySimpleUrlAuthenticationSuccessHandler;
import com.baeldung.security.MySimpleUrlAuthenticationSuccessHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager;

View File

@ -1,4 +1,4 @@
package org.baeldung.web.controller;
package com.baeldung.web.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,4 +1,4 @@
package org.baeldung.web.controller;
package com.baeldung.web.controller;
import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
@ -7,7 +7,7 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.baeldung.web.dto.Foo;
import com.baeldung.web.dto.Foo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.http.HttpStatus;

View File

@ -1,4 +1,4 @@
package org.baeldung.web.controller;
package com.baeldung.web.controller;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

View File

@ -1,4 +1,4 @@
package org.baeldung.web.controller;
package com.baeldung.web.controller;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;

View File

@ -1,4 +1,4 @@
package org.baeldung.web.interceptor;
package com.baeldung.web.interceptor;
import com.google.common.base.Strings;
import org.slf4j.Logger;

View File

@ -1,4 +1,4 @@
package org.baeldung.web.interceptor;
package com.baeldung.web.interceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@ -1,4 +1,4 @@
package org.baeldung.web.interceptor;
package com.baeldung.web.interceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -22,7 +22,7 @@
</http>
<beans:bean id="myAuthenticationSuccessHandler" class="org.baeldung.security.MySimpleUrlAuthenticationSuccessHandler"/>
<beans:bean id="myAuthenticationSuccessHandler" class="com.baeldung.security.MySimpleUrlAuthenticationSuccessHandler"/>
<authentication-manager id="authenticationManager">
<authentication-provider>
@ -33,8 +33,7 @@
</authentication-provider>
</authentication-manager>
<!-- <mvc:interceptors>
<bean id="loggerInterceptor" class="org.baeldung.web.interceptor.LoggerInterceptor" />
<!-- <mvc:interceptors>
<bean id="loggerInterceptor" class="com.baeldung.web.interceptor.LoggerInterceptor" />
</mvc:interceptors> -->
</beans:beans>

View File

@ -20,7 +20,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,7 +1,7 @@
package org.baeldung;
package com.baeldung;
import org.baeldung.spring.MvcConfig;
import org.baeldung.spring.SecSecurityConfig;
import com.baeldung.spring.MvcConfig;
import com.baeldung.spring.SecSecurityConfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;

View File

@ -1,11 +1,11 @@
package org.baeldung.security.csrf;
package com.baeldung.security.csrf;
import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.user;
import javax.servlet.Filter;
import org.baeldung.web.dto.Foo;
import com.baeldung.web.dto.Foo;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,10 +1,10 @@
package org.baeldung.security.csrf;
package com.baeldung.security.csrf;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.baeldung.security.spring.SecurityWithoutCsrfConfig;
import org.baeldung.spring.MvcConfig;
import com.baeldung.security.spring.SecurityWithoutCsrfConfig;
import com.baeldung.spring.MvcConfig;
import org.junit.Test;
import org.springframework.http.MediaType;
import org.springframework.test.context.ContextConfiguration;

View File

@ -1,11 +1,11 @@
package org.baeldung.security.csrf;
package com.baeldung.security.csrf;
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.csrf;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.baeldung.security.spring.SecurityWithCsrfConfig;
import org.baeldung.spring.MvcConfig;
import com.baeldung.security.spring.SecurityWithCsrfConfig;
import com.baeldung.spring.MvcConfig;
import org.junit.Test;
import org.springframework.http.MediaType;
import org.springframework.test.context.ContextConfiguration;

View File

@ -1,4 +1,4 @@
package org.baeldung.security.spring;
package com.baeldung.security.spring;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@ -1,11 +1,11 @@
package org.baeldung.security.spring;
package com.baeldung.security.spring;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import javax.servlet.http.HttpSession;
import org.baeldung.spring.MvcConfig;
import com.baeldung.spring.MvcConfig;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,4 +1,4 @@
package org.baeldung.security.spring;
package com.baeldung.security.spring;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@ -1,4 +1,4 @@
package org.baeldung.security.spring;
package com.baeldung.security.spring;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@ -1,10 +1,10 @@
package org.baeldung.web.interceptor;
package com.baeldung.web.interceptor;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.baeldung.security.spring.SecurityWithoutCsrfConfig;
import org.baeldung.spring.MvcConfig;
import com.baeldung.security.spring.SecurityWithoutCsrfConfig;
import com.baeldung.spring.MvcConfig;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,12 +1,12 @@
package org.baeldung.web.interceptor;
package com.baeldung.web.interceptor;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import javax.servlet.http.HttpSession;
import org.baeldung.security.spring.SecurityWithoutCsrfConfig;
import org.baeldung.spring.MvcConfig;
import com.baeldung.security.spring.SecurityWithoutCsrfConfig;
import com.baeldung.spring.MvcConfig;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,10 +1,10 @@
package org.baeldung.web.interceptor;
package com.baeldung.web.interceptor;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.baeldung.security.spring.SecurityWithoutCsrfConfig;
import org.baeldung.spring.MvcConfig;
import com.baeldung.security.spring.SecurityWithoutCsrfConfig;
import com.baeldung.spring.MvcConfig;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring;
package com.baeldung.spring;
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
@ -7,7 +7,7 @@ import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.baeldung.client.HttpComponentsClientHttpRequestFactoryDigestAuth;
import com.baeldung.client.HttpComponentsClientHttpRequestFactoryDigestAuth;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;

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.Configuration;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring;
package com.baeldung.spring;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@ -6,7 +6,7 @@ import org.springframework.context.annotation.ImportResource;
@Configuration
@ImportResource({ "classpath:webSecurityConfig.xml" })
@ComponentScan("org.baeldung.security")
@ComponentScan("com.baeldung.security")
public class SecSecurityConfig {
public SecSecurityConfig() {

View File

@ -16,7 +16,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.spring.ClientConfig;
import org.baeldung.spring.MvcConfig;
import org.baeldung.spring.SecSecurityConfig;
import com.baeldung.spring.ClientConfig;
import com.baeldung.spring.MvcConfig;
import com.baeldung.spring.SecSecurityConfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;

View File

@ -1,4 +1,4 @@
package org.baeldung.client;
package com.baeldung.client;
import java.io.IOException;
@ -6,7 +6,7 @@ import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.baeldung.spring.ClientConfig;
import com.baeldung.spring.ClientConfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;

View File

@ -23,7 +23,7 @@
<session-management session-fixation-protection="none"/>
</http>
<beans:bean name="customLogoutSuccessHandler" class="org.baeldung.security.CustomLogoutSuccessHandler"/>
<beans:bean name="customLogoutSuccessHandler" class="com.baeldung.security.CustomLogoutSuccessHandler"/>
<authentication-manager>
<authentication-provider>

View File

@ -25,11 +25,11 @@
</http>
<beans:bean name="customLogoutSuccessHandler" class="org.baeldung.security.CustomLogoutSuccessHandler"/>
<beans:bean name="customLogoutSuccessHandler" class="com.baeldung.security.CustomLogoutSuccessHandler"/>
<beans:bean name="customAccessDeniedHandler" class="org.baeldung.security.CustomAccessDeniedHandler" />
<beans:bean name="customAccessDeniedHandler" class="com.baeldung.security.CustomAccessDeniedHandler" />
<beans:bean id="authenticationFailureHandler" name="customAuthenticationFaiureHandler" class="org.baeldung.security.CustomAuthenticationFailureHandler"/>
<beans:bean id="authenticationFailureHandler" name="customAuthenticationFaiureHandler" class="com.baeldung.security.CustomAuthenticationFailureHandler"/>
<authentication-manager>
<authentication-provider>

View File

@ -3,6 +3,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="org.baeldung.controller" />
<context:component-scan base-package="com.baeldung.controller" />
</beans>

View File

@ -1,4 +1,4 @@
package org.baeldung.controller;
package com.baeldung.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

View File

@ -1,8 +1,8 @@
package org.baeldung.service;
package com.baeldung.service;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.baeldung.security.SecurityRole;
import com.baeldung.security.SecurityRole;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;

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;
@ -14,7 +14,7 @@ import org.springframework.web.servlet.view.JstlView;
* Spring Web Configuration.
*/
@EnableWebMvc
@ComponentScan("org.baeldung")
@ComponentScan("com.baeldung")
@Configuration
public class MvcConfig extends WebMvcConfigurerAdapter {

View File

@ -1,4 +1,4 @@
package org.baeldung.spring;
package com.baeldung.spring;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

View File

@ -19,7 +19,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.spring.MvcConfig;
import org.baeldung.spring.PersistenceConfig;
import org.baeldung.spring.SecurityConfig;
import com.baeldung.spring.MvcConfig;
import com.baeldung.spring.PersistenceConfig;
import com.baeldung.spring.SecurityConfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;

View File

@ -13,7 +13,7 @@ public final class MetricRegistrySingleton {
public static final MetricRegistry metrics = new MetricRegistry();
static {
Logger logger = LoggerFactory.getLogger("org.baeldung.monitoring");
Logger logger = LoggerFactory.getLogger("com.baeldung.monitoring");
final Slf4jReporter reporter = Slf4jReporter.forRegistry(metrics).outputTo(logger).convertRatesTo(TimeUnit.SECONDS).convertDurationsTo(TimeUnit.MILLISECONDS).build();
reporter.start(5, TimeUnit.MINUTES);
}

View File

@ -30,7 +30,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>
@ -60,7 +60,7 @@
<!-- <filter>
<filter-name>SessionFilter</filter-name>
<filter-class>org.baeldung.security.SessionFilter</filter-class>
<filter-class>com.baeldung.security.SessionFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>SessionFilter</filter-name>

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.Configuration;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring;
package com.baeldung.spring;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

View File

@ -15,7 +15,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,7 +1,7 @@
package org.baeldung;
package com.baeldung;
import org.baeldung.spring.MvcConfig;
import org.baeldung.spring.SecSecurityConfig;
import com.baeldung.spring.MvcConfig;
import com.baeldung.spring.SecSecurityConfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;

View File

@ -1,4 +1,4 @@
package org.baeldung.basic;
package com.baeldung.basic;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint;

View File

@ -1,4 +1,4 @@
package org.baeldung.client;
package com.baeldung.client;
import org.apache.http.HttpHost;
import org.springframework.beans.factory.FactoryBean;

View File

@ -1,10 +1,10 @@
package org.baeldung.client.spring;
package com.baeldung.client.spring;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan("org.baeldung.client")
@ComponentScan("com.baeldung.client")
public class ClientConfig {
public ClientConfig() {

View File

@ -1,6 +1,6 @@
package org.baeldung.filter;
package com.baeldung.filter;
import org.baeldung.security.RestAuthenticationEntryPoint;
import com.baeldung.security.RestAuthenticationEntryPoint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@ -1,4 +1,4 @@
package org.baeldung.spring;
package com.baeldung.spring;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@ -6,7 +6,7 @@ import org.springframework.context.annotation.ImportResource;
@Configuration
@ImportResource({ "classpath:webSecurityConfig.xml" })
@ComponentScan("org.baeldung.security")
@ComponentScan("com.baeldung.security")
public class SecSecurityConfig {
public SecSecurityConfig() {

View File

@ -1,4 +1,4 @@
package org.baeldung.spring;
package com.baeldung.spring;
import java.util.List;
@ -11,7 +11,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
@EnableWebMvc
@ComponentScan("org.baeldung.web")
@ComponentScan("com.baeldung.web")
public class WebConfig implements WebMvcConfigurer {
public WebConfig() {

View File

@ -1,9 +1,9 @@
package org.baeldung.web.controller;
package com.baeldung.web.controller;
import java.nio.charset.Charset;
import org.apache.commons.codec.binary.Base64;
import org.baeldung.web.dto.Bar;
import com.baeldung.web.dto.Bar;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.http.HttpHeaders;

View File

@ -1,6 +1,6 @@
package org.baeldung.web.controller;
package com.baeldung.web.controller;
import org.baeldung.web.dto.Foo;
import com.baeldung.web.dto.Foo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.security.access.prepost.PreAuthorize;

View File

@ -23,6 +23,6 @@
<global-method-security pre-post-annotations="enabled"/>
<beans:bean id="myBasicAuthenticationEntryPoint" class="org.baeldung.basic.MyBasicAuthenticationEntryPoint" />
<beans:bean id="myBasicAuthenticationEntryPoint" class="com.baeldung.basic.MyBasicAuthenticationEntryPoint" />
</beans:beans>

View File

@ -12,7 +12,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,4 +1,4 @@
package org.baeldung.config;
package com.baeldung.config;
import java.util.Set;
@ -30,7 +30,7 @@ public class MainWebAppInitializer implements WebApplicationInitializer {
// Create the 'root' Spring application context
final AnnotationConfigWebApplicationContext root = new AnnotationConfigWebApplicationContext();
root.scan("org.baeldung.config.parent");
root.scan("com.baeldung.config.parent");
// root.getEnvironment().setDefaultProfiles("embedded");
// Manages the lifecycle of the root application context
@ -38,7 +38,7 @@ public class MainWebAppInitializer implements WebApplicationInitializer {
// Handles requests into the application
final AnnotationConfigWebApplicationContext childWebApplicationContext = new AnnotationConfigWebApplicationContext();
childWebApplicationContext.scan("org.baeldung.config.child");
childWebApplicationContext.scan("com.baeldung.config.child");
final ServletRegistration.Dynamic appServlet = sc.addServlet("api", new DispatcherServlet(childWebApplicationContext));
appServlet.setLoadOnStartup(1);
final Set<String> mappingConflicts = appServlet.addMapping("/");

View File

@ -1,4 +1,4 @@
package org.baeldung.config.child;
package com.baeldung.config.child;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;

View File

@ -1,4 +1,4 @@
package org.baeldung.config.child;
package com.baeldung.config.child;
import java.util.List;
@ -23,7 +23,7 @@ import org.thymeleaf.templateresolver.ITemplateResolver;
@Configuration
@EnableWebMvc
@ComponentScan("org.baeldung.web")
@ComponentScan("com.baeldung.web")
//@ImportResource({ "classpath:prop.xml" })
//@PropertySource("classpath:foo.properties")
public class WebConfig implements WebMvcConfigurer {

View File

@ -1,6 +1,6 @@
package org.baeldung.config.parent;
package com.baeldung.config.parent;
import org.baeldung.security.CustomAuthenticationProvider;
import com.baeldung.security.CustomAuthenticationProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@ -12,7 +12,7 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
@Configuration
//@ImportResource({ "classpath:webSecurityConfig.xml" })
@EnableWebSecurity
@ComponentScan("org.baeldung.security")
@ComponentScan("com.baeldung.security")
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired

View File

@ -1,4 +1,4 @@
package org.baeldung.config.parent;
package com.baeldung.config.parent;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
@ -7,7 +7,7 @@ import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
@Configuration
@ComponentScan("org.baeldung.service")
@ComponentScan("com.baeldung.service")
// @ImportResource({ "classpath:prop.xml" })
@PropertySource("classpath:foo.properties")
public class ServiceConfig {

View File

@ -1,4 +1,4 @@
package org.baeldung.security;
package com.baeldung.security;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;

View File

@ -1,6 +1,6 @@
package org.baeldung.service;
package com.baeldung.service;
import org.baeldung.web.dto.Foo;
import com.baeldung.web.dto.Foo;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;

Some files were not shown because too many files have changed in this diff Show More