Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
- <properties>
- <org.springframework-version>
- 4.1.1.RELEASE
- </org.springframework-version>
- <hibernate.version>5.1.0.Final</hibernate.version>
- <org.aspectj-version>1.8.0</org.aspectj-version>
- <org.slf4j-version>1.7.12</org.slf4j-version>
- </properties>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-aop</artifactId>
- <version>${org.springframework-version}</version>
- </dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <version>${aspectj.version}</version>
- </dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjweaver</artifactId>
- <version>${aspectj.version}</version>
- </dependency>
- <?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:aop="http://www.springframework.org/schema/aop"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:jee="http://www.springframework.org/schema/jee"
- xmlns:lang="http://www.springframework.org/schema/lang"
- xmlns:p="http://www.springframework.org/schema/p"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
- http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
- http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
- <context:annotation-config />
- <context:component-scan base-package="net.viralpatel.contact" />
- <bean id="jspViewResolver"
- class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="viewClass"
- value="org.springframework.web.servlet.view.JstlView" />
- <property name="prefix" value="/WEB-INF/jsp/" />
- <property name="suffix" value=".jsp" />
- </bean>
- <bean id="messageSource"
- class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
- <property name="basename" value="classpath:messages" />
- <property name="defaultEncoding" value="UTF-8" />
- </bean>
- <bean id="propertyConfigurer"
- class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
- p:location="/WEB-INF/jdbc.properties" />
- <bean id="dataSource"
- class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"
- p:driverClassName="${jdbc.driverClassName}"
- p:url="${jdbc.databaseurl}" p:username="${jdbc.username}"
- p:password="${jdbc.password}" />
- <bean id="sessionFactory"
- class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
- <property name="dataSource" ref="dataSource" />
- <property name="configLocation">
- <value>classpath:hibernate.cfg.xml</value>
- </property>
- <property name="configurationClass">
- <value>org.hibernate.cfg.AnnotationConfiguration</value>
- </property>
- <property name="hibernateProperties">
- <props>
- <prop key="hibernate.dialect">${jdbc.dialect}</prop>
- <prop key="hibernate.show_sql">true</prop>
- </props>
- </property>
- </bean>
- <tx:annotation-driven />
- <bean id="transactionManager"
- class="org.springframework.orm.hibernate5.HibernateTransactionManager">
- <property name="sessionFactory" ref="sessionFactory" />
- </bean>
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement