Find file
Fetching contributors…
Cannot retrieve contributors at this time
69 lines (53 sloc) 3.14 KB
<?xml version="1.0" encoding="UTF-8"?>
<beans xsi:schemaLocation=" http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/data/neo4j http://www.springframework.org/schema/data/neo4j/spring-neo4j.xsd"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:neo4j="http://www.springframework.org/schema/data/neo4j"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans">
<context:spring-configured/>
<!-- Load Hibernate related configuration -->
<import resource="hibernate-context.xml"/>
<import resource="security-conf.xml"/>
<!-- Neo4j repository implementation -->
<neo4j:repositories base-package="com.Neuverd.repo*"/>
<context:annotation-config/>
<context:component-scan base-package="com.Neuverd.domain*"/>
<context:component-scan base-package="com.Neuverd.DAO*"/>
<context:component-scan base-package="com.Neuverd.test*"/>
<context:component-scan base-package="com.Neuverd.Validator*"/>
<context:component-scan base-package="com.Neuverd.Controller*"/>
<!-- Neo4j configuration namespace -->
<neo4j:config storeDirectory="c:/neo4j/data" entityManagerFactory="entityManagerFactory"/>
<mvc:annotation-driven/>
<mvc:resources mapping="/resources/**" location="/resources/" />
<beans:bean id="localeResolver"
class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
<beans:property name="defaultLocale" value="en" />
</beans:bean>
<!-- Declare a datasource that has pooling capabilities-->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close"
p:driverClassName="${app.jdbc.driverClassName}"
p:url="${app.jdbc.url}"
p:username="${app.jdbc.username}"
p:password="${app.jdbc.password}"
/>
<!-- Loggin using AOP -->
<bean id="myTraceInterceptor" class="com.Neuverd.Common.MyTraceInterceptor">
<property name="enterMessage" value="ENTERING: $[methodName]($[arguments])"/>
<property name="exitMessage" value="LEAVING: $[methodName](): $[invocationTime]ms"/>
</bean>
<aop:config>
<aop:advisor advice-ref="myTraceInterceptor" pointcut="execution(* com.Neuverd.Controller.*.*(..))"/>
<aop:advisor advice-ref="myTraceInterceptor" pointcut="execution(* com.Neuverd.Service.*.*(..))"/>
</aop:config>
<aop:aspectj-autoproxy/>
</beans>