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:
commit
fd69ba1589
|
@ -1,4 +1,4 @@
|
||||||
package com.baeldung.config;
|
package com.baeldung.themes.config;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
|
import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
|
||||||
|
@ -27,7 +27,7 @@ public class DataSourceConfig {
|
||||||
public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) {
|
public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) {
|
||||||
LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
|
LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
|
||||||
em.setDataSource(dataSource);
|
em.setDataSource(dataSource);
|
||||||
em.setPackagesToScan("com.baeldung.domain");
|
em.setPackagesToScan("com.baeldung.themes.domain");
|
||||||
em.setJpaVendorAdapter(new HibernateJpaVendorAdapter());
|
em.setJpaVendorAdapter(new HibernateJpaVendorAdapter());
|
||||||
return em;
|
return em;
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baeldung.config;
|
package com.baeldung.themes.config;
|
||||||
|
|
||||||
import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer;
|
import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baeldung.config;
|
package com.baeldung.themes.config;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
|
@ -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.Bean;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baeldung.config;
|
package com.baeldung.themes.config;
|
||||||
|
|
||||||
import org.springframework.web.WebApplicationInitializer;
|
import org.springframework.web.WebApplicationInitializer;
|
||||||
import org.springframework.web.context.ContextLoaderListener;
|
import org.springframework.web.context.ContextLoaderListener;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baeldung.controllers;
|
package com.baeldung.themes.controllers;
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baeldung.domain;
|
package com.baeldung.themes.domain;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
|
@ -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;
|
import org.springframework.data.repository.PagingAndSortingRepository;
|
||||||
|
|
||||||
public interface UserPreferenceRepository extends PagingAndSortingRepository<UserPreference, String> {
|
public interface UserPreferenceRepository extends PagingAndSortingRepository<UserPreference, String> {
|
|
@ -1,7 +1,7 @@
|
||||||
package com.baeldung.theme.resolver;
|
package com.baeldung.themes.resolver;
|
||||||
|
|
||||||
import com.baeldung.domain.UserPreference;
|
import com.baeldung.themes.domain.UserPreference;
|
||||||
import com.baeldung.repository.UserPreferenceRepository;
|
import com.baeldung.themes.repository.UserPreferenceRepository;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
import org.springframework.security.core.context.SecurityContextHolder;
|
import org.springframework.security.core.context.SecurityContextHolder;
|
Loading…
Reference in New Issue