Skip to content

Instantly share code, notes, and snippets.

@krams915
Created December 10, 2012 14:34
Show Gist options
  • Save krams915/4250887 to your computer and use it in GitHub Desktop.
Save krams915/4250887 to your computer and use it in GitHub Desktop.
Spring Social applicationContext.xml
<?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/" />
<!-- Provides internationalization of messages -->
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"
p:basename="messages" />
<!-- Imports Spring Social configuration -->
<import resource="spring-social.xml"/>
<!-- Imports datasource configuration -->
<import resource="spring-data.xml"/>
<!-- Imports logging configuration -->
<import resource="trace-context.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