Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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:tx="http://www.springframework.org/schema/tx"
- xmlns:mvc="http://www.springframework.org/schema/mvc"
- xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.2.xsd">
- <context:component-scan base-package="com.accenture"></context:component-scan>
- <context:annotation-config></context:annotation-config>
- <mvc:annotation-driven></mvc:annotation-driven>
- <tx:annotation-driven/>
- <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="prefix" value="/jsps/"></property>
- <property name="suffix" value=".jsp"></property>
- </bean>
- <bean id="ds" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
- <property name="username" value="root"></property>
- <property name="password" value="root"></property>
- <property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
- <property name="url" value="jdbc:mysql://localhost:3306/login"></property>
- </bean>
- <bean id="template" class="org.springframework.jdbc.core.JdbcTemplate">
- <property name="dataSource" ref="ds"></property>
- </bean>
- <!-- <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
- <property name="basename" value="validation.properties"></property>
- </bean> -->
- <!-- <bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
- <property name="defaultLocale" value="en_US"></property>
- </bean> -->
- <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
- <property name="dataSource" ref="ds"></property>
- <property name="configLocation" value="classpath:hibernate.cfg.xml"></property>
- </bean>
- <bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager" primary="true">
- <property name="sessionFactory" ref="sessionFactory"></property>
- </bean>
- <bean id="transactionManager1" class="org.springframework.jdbc.datasource.DataSourceTransactionManager" primary="false">
- <property name="dataSource" ref="ds"></property>
- </bean>
- </beans>
- =========================================================================================xml==============
- <?xml version="1.0" encoding="UTF-8"?>
- <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
- <display-name>Login</display-name>
- <servlet>
- <servlet-name>accent</servlet-name>
- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <!-- Map all requests to the DispatcherServlet for handling -->
- <servlet-mapping>
- <servlet-name>accent</servlet-name>
- <url-pattern>*.htm</url-pattern>
- </servlet-mapping>
- </web-app>
Add Comment
Please, Sign In to add comment