diff --git a/spring-mvc-views/src/main/java/com/baeldung/config/DataSourceConfig.java b/spring-mvc-views/src/main/java/com/baeldung/themes/config/DataSourceConfig.java similarity index 94% rename from spring-mvc-views/src/main/java/com/baeldung/config/DataSourceConfig.java rename to spring-mvc-views/src/main/java/com/baeldung/themes/config/DataSourceConfig.java index 803c30f29d..3b1abfd459 100644 --- a/spring-mvc-views/src/main/java/com/baeldung/config/DataSourceConfig.java +++ b/spring-mvc-views/src/main/java/com/baeldung/themes/config/DataSourceConfig.java @@ -1,4 +1,4 @@ -package com.baeldung.config; +package com.baeldung.themes.config; import org.springframework.context.annotation.Bean; import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; @@ -27,7 +27,7 @@ public class DataSourceConfig { public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) { LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean(); em.setDataSource(dataSource); - em.setPackagesToScan("com.baeldung.domain"); + em.setPackagesToScan("com.baeldung.themes.domain"); em.setJpaVendorAdapter(new HibernateJpaVendorAdapter()); return em; } diff --git a/spring-mvc-views/src/main/java/com/baeldung/config/InitSecurity.java b/spring-mvc-views/src/main/java/com/baeldung/themes/config/InitSecurity.java similarity index 82% rename from spring-mvc-views/src/main/java/com/baeldung/config/InitSecurity.java rename to spring-mvc-views/src/main/java/com/baeldung/themes/config/InitSecurity.java index 2bf659f476..929e49cb79 100644 --- a/spring-mvc-views/src/main/java/com/baeldung/config/InitSecurity.java +++ b/spring-mvc-views/src/main/java/com/baeldung/themes/config/InitSecurity.java @@ -1,4 +1,4 @@ -package com.baeldung.config; +package com.baeldung.themes.config; import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer; diff --git a/spring-mvc-views/src/main/java/com/baeldung/config/SecurityConfig.java b/spring-mvc-views/src/main/java/com/baeldung/themes/config/SecurityConfig.java similarity index 98% rename from spring-mvc-views/src/main/java/com/baeldung/config/SecurityConfig.java rename to spring-mvc-views/src/main/java/com/baeldung/themes/config/SecurityConfig.java index 2e0a413cf3..78a52d4f8b 100644 --- a/spring-mvc-views/src/main/java/com/baeldung/config/SecurityConfig.java +++ b/spring-mvc-views/src/main/java/com/baeldung/themes/config/SecurityConfig.java @@ -1,4 +1,4 @@ -package com.baeldung.config; +package com.baeldung.themes.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; diff --git a/spring-mvc-views/src/main/java/com/baeldung/config/ThemeMVCConfig.java b/spring-mvc-views/src/main/java/com/baeldung/themes/config/ThemeMVCConfig.java similarity index 94% rename from spring-mvc-views/src/main/java/com/baeldung/config/ThemeMVCConfig.java rename to spring-mvc-views/src/main/java/com/baeldung/themes/config/ThemeMVCConfig.java index 86f6f54195..1d3f94258e 100644 --- a/spring-mvc-views/src/main/java/com/baeldung/config/ThemeMVCConfig.java +++ b/spring-mvc-views/src/main/java/com/baeldung/themes/config/ThemeMVCConfig.java @@ -1,6 +1,6 @@ -package com.baeldung.config; +package com.baeldung.themes.config; -import com.baeldung.theme.resolver.UserPreferenceThemeResolver; +import com.baeldung.themes.resolver.UserPreferenceThemeResolver; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; diff --git a/spring-mvc-views/src/main/java/com/baeldung/config/WebInitializer.java b/spring-mvc-views/src/main/java/com/baeldung/themes/config/WebInitializer.java similarity index 96% rename from spring-mvc-views/src/main/java/com/baeldung/config/WebInitializer.java rename to spring-mvc-views/src/main/java/com/baeldung/themes/config/WebInitializer.java index 5516fb7b3c..3fbe8d043d 100644 --- a/spring-mvc-views/src/main/java/com/baeldung/config/WebInitializer.java +++ b/spring-mvc-views/src/main/java/com/baeldung/themes/config/WebInitializer.java @@ -1,4 +1,4 @@ -package com.baeldung.config; +package com.baeldung.themes.config; import org.springframework.web.WebApplicationInitializer; import org.springframework.web.context.ContextLoaderListener; diff --git a/spring-mvc-views/src/main/java/com/baeldung/controllers/AppController.java b/spring-mvc-views/src/main/java/com/baeldung/themes/controllers/AppController.java similarity index 85% rename from spring-mvc-views/src/main/java/com/baeldung/controllers/AppController.java rename to spring-mvc-views/src/main/java/com/baeldung/themes/controllers/AppController.java index 31343492e1..ed398fa60a 100644 --- a/spring-mvc-views/src/main/java/com/baeldung/controllers/AppController.java +++ b/spring-mvc-views/src/main/java/com/baeldung/themes/controllers/AppController.java @@ -1,4 +1,4 @@ -package com.baeldung.controllers; +package com.baeldung.themes.controllers; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/spring-mvc-views/src/main/java/com/baeldung/domain/UserPreference.java b/spring-mvc-views/src/main/java/com/baeldung/themes/domain/UserPreference.java similarity index 93% rename from spring-mvc-views/src/main/java/com/baeldung/domain/UserPreference.java rename to spring-mvc-views/src/main/java/com/baeldung/themes/domain/UserPreference.java index 81034de947..89f8ea1a36 100644 --- a/spring-mvc-views/src/main/java/com/baeldung/domain/UserPreference.java +++ b/spring-mvc-views/src/main/java/com/baeldung/themes/domain/UserPreference.java @@ -1,4 +1,4 @@ -package com.baeldung.domain; +package com.baeldung.themes.domain; import javax.persistence.Entity; import javax.persistence.Id; diff --git a/spring-mvc-views/src/main/java/com/baeldung/repository/UserPreferenceRepository.java b/spring-mvc-views/src/main/java/com/baeldung/themes/repository/UserPreferenceRepository.java similarity index 66% rename from spring-mvc-views/src/main/java/com/baeldung/repository/UserPreferenceRepository.java rename to spring-mvc-views/src/main/java/com/baeldung/themes/repository/UserPreferenceRepository.java index 77e5da0498..d4e4ff0a5e 100644 --- a/spring-mvc-views/src/main/java/com/baeldung/repository/UserPreferenceRepository.java +++ b/spring-mvc-views/src/main/java/com/baeldung/themes/repository/UserPreferenceRepository.java @@ -1,6 +1,6 @@ -package com.baeldung.repository; +package com.baeldung.themes.repository; -import com.baeldung.domain.UserPreference; +import com.baeldung.themes.domain.UserPreference; import org.springframework.data.repository.PagingAndSortingRepository; public interface UserPreferenceRepository extends PagingAndSortingRepository { diff --git a/spring-mvc-views/src/main/java/com/baeldung/theme/resolver/UserPreferenceThemeResolver.java b/spring-mvc-views/src/main/java/com/baeldung/themes/resolver/UserPreferenceThemeResolver.java similarity index 95% rename from spring-mvc-views/src/main/java/com/baeldung/theme/resolver/UserPreferenceThemeResolver.java rename to spring-mvc-views/src/main/java/com/baeldung/themes/resolver/UserPreferenceThemeResolver.java index 4c59734d41..ff160110fd 100644 --- a/spring-mvc-views/src/main/java/com/baeldung/theme/resolver/UserPreferenceThemeResolver.java +++ b/spring-mvc-views/src/main/java/com/baeldung/themes/resolver/UserPreferenceThemeResolver.java @@ -1,7 +1,7 @@ -package com.baeldung.theme.resolver; +package com.baeldung.themes.resolver; -import com.baeldung.domain.UserPreference; -import com.baeldung.repository.UserPreferenceRepository; +import com.baeldung.themes.domain.UserPreference; +import com.baeldung.themes.repository.UserPreferenceRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder;