Created
November 30, 2013 01:47
-
-
Save Qkyrie/7714397 to your computer and use it in GitHub Desktop.
Default Application Config for Spring NO-XML Approach
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.qkyrie.dom.domtools.Application; | |
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.ComponentScan; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.core.io.ClassPathResource; | |
import org.springframework.stereotype.Controller; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: Quinten | |
* Date: 27-11-13 | |
* Time: 23:54 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
@Configuration | |
@ComponentScan(basePackageClasses = Application.class, excludeFilters = @ComponentScan.Filter(Controller.class)) | |
public class ApplicationConfig { | |
@Bean | |
public static PropertyPlaceholderConfigurer propertyPlaceholderConfigurer() { | |
PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer(); | |
ppc.setLocation(new ClassPathResource("/persistence.properties")); | |
return ppc; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment