package <%=@package%>.config; <%=@licence%> <%if @repository_technique == "jpa"-%> import org.springframework.data.jpa.repository.config.EnableJpaRepositories; <%elsif @repository_technique == "mongodb"-%> import org.springframework.data.mongodb.repository.config.EnableMongoRepositories; <%elsif @repository_technique == "neo4j"-%> <%end-%> import org.springframework.boot.orm.jpa.EntityScan; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.data.web.config.EnableSpringDataWebSupport; import org.springframework.web.servlet.config.annotation.EnableWebMvc; /** * Application config-class. * * @author <%=@user_name%> */ @Configuration @EnableWebMvc @ComponentScan(basePackages = {"<%=@package%>"}) <%if @repository_technique == "jpa"-%> @EnableJpaRepositories(basePackages = "<%=@package%>.repository") <%elsif @repository_technique == "mongodb"-%> @EnableMongoRepositories(basePackages = "<%=@package%>.repository") <%elsif @repository_technique == "neo4j"-%> <%end-%> @EntityScan(basePackages = "<%=@package%>.repository") @EnableSpringDataWebSupport public class AppConfig { @Bean public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { return new PropertySourcesPlaceholderConfigurer(); } }