Created
December 2, 2012 08:14
applicationContext.xml JavaConfig
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:p="http://www.springframework.org/schema/p" | |
xmlns:mvc="http://www.springframework.org/schema/mvc" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd | |
http://www.springframework.org/schema/context | |
http://www.springframework.org/schema/context/spring-context-3.1.xsd | |
http://www.springframework.org/schema/mvc | |
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd"> | |
<context:property-placeholder properties-ref="deployProperties" /> | |
<!-- Activates various annotations to be detected in bean classes --> | |
<context:annotation-config /> | |
<!-- Scans the classpath for annotated components that will be auto-registered as Spring beans. | |
For example @Controller and @Service. Make sure to set the correct base-package --> | |
<context:component-scan base-package="org.krams" /> | |
<!-- Configures the annotation-driven Spring MVC Controller programming model. | |
Note that, with Spring 3.0, this tag works in Servlet MVC only! --> | |
<mvc:annotation-driven /> | |
<!-- Maps resources path to webapp/resources --> | |
<mvc:resources mapping="/resources/**" location="/resources/" /> | |
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource" | |
p:basename="messages" /> | |
<!-- Imports logging configuration --> | |
<import resource="trace-context.xml"/> | |
<!-- Imports datasource configuration --> | |
<import resource="spring-data.xml"/> | |
<bean id="deployProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean" | |
p:location="/WEB-INF/spring.properties" /> | |
</beans> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment