GithubHelp home page GithubHelp logo

yefengchun / spring-javaconfig-sample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arey/spring-javaconfig-sample

0.0 2.0 0.0 37 KB

Spring JavaConfig example for Spring MVC / Spring Data JPA / Hibernate

Java 100.00%

spring-javaconfig-sample's Introduction

Spring Java Config Sample

Since Spring 3.0, the JavaConfig features are included in the Core Spring module. Thus Java Developer could move Spring beans definition from configuration XML files to Java classes.

Based on Spring Framework 4.3, Spring Data JPA 1.6, Spring Security 3.2 and Hibernate 4.3, this sample show how to use the Spring's new Java-configuration support and its @Configuration-annotated class.

The following classes, interfaces and annotations are used in the sample:

  • JavaConfig main classes and annotations: @Configuration, @Bean, @ComponentScan, @Import, @ImportResource, @Profile, Environment, JndiObjectFactoryBean, @Scope
  • Spring Test: @WebAppConfiguration, @ContextConfiguration, @ActiveProfiles; @ContextHierarchy
  • Advanced Spring Framework features: @EnableTransactionManagement, @EnableAsync, @EnableCaching, @EnableAspectJAutoProxy
  • Spring Data Jpa annotations: @EnableJpaRepositories
  • Spring Security classes: @EnableWebMvcSecurity, WebSecurityConfigurerAdapter
  • Spring MVC features: @EnableWebMvc, WebMvcConfigurerAdapter, RequestMappingHandlerAdapter, InternalResourceViewResolver, ignoreDefaultModelOnRedirect

Build Status

Travis : Build Status

Cloudbees Jenkins : Build Status

Quick start

Download the code with git: git clone git://github.com/arey/spring-javaconfig-sample.git

Compile the code with maven: mvn clean install

If you're using an IDE that supports Maven-based projects (InteliJ Idea, Netbeans or m2Eclipse), you can import the project directly from its POM. Otherwise, generate IDE metadata with the related IDE maven plugin: mvn eclipse:clean eclipse:eclipse

Documentation

French articles on the javaetmoi.com blog:

Credits

  • Uses Maven as a build tool
  • Uses Cloudbees and Travis CI for continuous integration builds whenever code is pushed into GitHub

spring-javaconfig-sample's People

Contributors

arey avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.