Merge pull request #8483 from sandy03934/BAEL-3283

BAEL-3283 - Moved the code to a single package meant for the themes t…
This commit is contained in:
Josh Cummings 2020-01-07 07:22:00 -07:00 committed by GitHub
commit fd69ba1589
9 changed files with 14 additions and 14 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
package com.baeldung.config;
package com.baeldung.themes.config;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.ContextLoaderListener;

View File

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

View File

@ -1,4 +1,4 @@
package com.baeldung.domain;
package com.baeldung.themes.domain;
import javax.persistence.Entity;
import javax.persistence.Id;

View File

@ -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<UserPreference, String> {

View File

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