Sha256: 43360b90ae004fb0dcd32731d1502ff2018bece59ee09950559c548a7e1a3095

Contents?: true

Size: 1.44 KB

Versions: 4

Compression:

Stored size: 1.44 KB

Contents

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();
  }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spring-gen-0.2.3 lib/templates/src/main/java/config/AppConfig.java.erb
spring-gen-0.2.2 lib/templates/src/main/java/config/AppConfig.java.erb
spring-gen-0.2.1 lib/templates/layout/src/java/config/AppConfig.java.erb
spring-gen-0.2.0 lib/templates/layout/src/java/config/AppConfig.java.erb