Source Code‎ > ‎src‎ > ‎

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"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

    <!-- JDBC Datasource -->
    <bean id="dataSource"
        class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="com.mysql.jdbc.Driver">
        </property>
        <property name="url" value="jdbc:mysql://localhost:3306/demo_ors">
        </property>
        <property name="username" value="root"></property>
        <property name="password" value="root"></property>
    </bean>

    <!-- Hibernate Configuration -->
    <bean id="sessionFactory"
        class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="dataSource">
            <ref bean="dataSource" />
        </property>
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">
                    org.hibernate.dialect.MySQLDialect
                </prop>
                <prop key="hibernate.show_sql">true</prop>
                <prop key="hibernate.hbm2ddl.auto">update</prop>
            </props>
        </property>
        <property name="mappingResources">
            <list>
                <value>in/co/sunrays/proj1/dto/MarksheetDTO.hbm.xml</value>
                <value>in/co/sunrays/proj1/dto/UserDTO.hbm.xml</value>
                <value>in/co/sunrays/proj1/dto/StudentDTO.hbm.xml</value>
                <value>in/co/sunrays/proj1/dto/RoleDTO.hbm.xml</value>
                <value>in/co/sunrays/proj1/dto/CollegeDTO.hbm.xml</value>
            </list>
        </property>
    </bean>

    <!-- DAO Mappings -->
    <bean id="userDAO" class="in.co.sunrays.proj1.dao.UserDAOHibImpl"
        scope="prototype">
        <property name="sessionFactory" ref="sessionFactory"></property>
    </bean>

    <bean id="roleDAO" class="in.co.sunrays.proj1.dao.RoleDAOHibImpl"
        scope="prototype">
        <property name="sessionFactory" ref="sessionFactory"></property>
    </bean>

    <bean id="marksheetDAO" class="in.co.sunrays.proj1.dao.MarksheetDAOHibImpl"
        scope="prototype">
        <property name="sessionFactory" ref="sessionFactory"></property>
    </bean>

    <bean id="collegeDAO" class="in.co.sunrays.proj1.dao.CollegeDAOHibImpl"
        scope="prototype">
        <property name="sessionFactory" ref="sessionFactory"></property>
    </bean>

    <bean id="studentDAO" class="in.co.sunrays.proj1.dao.StudentDAOHibImpl"
        scope="prototype">
        <property name="sessionFactory" ref="sessionFactory"></property>
    </bean>

    <!-- Service Mappings -->
    <bean id="userService" class="in.co.sunrays.proj1.service.UserServiceSpringImpl"
        scope="prototype">
        <property name="dao" ref="userDAO"></property>
    </bean>

    <bean id="roleService" class="in.co.sunrays.proj1.service.RoleServiceSpringImpl"
        scope="prototype">
        <property name="dao" ref="roleDAO"></property>
    </bean>

    <bean id="marksheetService" class="in.co.sunrays.proj1.service.MarksheetServiceSpringImpl"
        scope="prototype">
        <property name="dao" ref="marksheetDAO"></property>
    </bean>

    <bean id="collegeService" class="in.co.sunrays.proj1.service.CollegeServiceSpringImpl"
        scope="prototype">
        <property name="dao" ref="collegeDAO"></property>
    </bean>

    <bean id="studentService" class="in.co.sunrays.proj1.service.StudentServiceSpringImpl"
        scope="prototype">
        <property name="dao" ref="studentDAO"></property>
    </bean>

    <!-- Service Mappings -->
    <bean id="ChangePasswordAction" class="in.co.sunrays.proj1.action.ChangePasswordAction"
        scope="prototype">
        <property name="service" ref="userService"></property>
    </bean>

    <bean id="CollegeAction" class="in.co.sunrays.proj1.action.CollegeAction"
        scope="prototype">
        <property name="service" ref="collegeService"></property>
    </bean>

    <bean id="CollegeListAction" class="in.co.sunrays.proj1.action.CollegeListAction"
        scope="prototype">
        <property name="service" ref="collegeService"></property>
    </bean>

    <bean id="ForgetPasswordAction" class="in.co.sunrays.proj1.action.ForgetPasswordAction"
        scope="prototype">
        <property name="service" ref="userService"></property>
    </bean>

    <bean id="GetMarksheetAction" class="in.co.sunrays.proj1.action.GetMarksheetAction"
        scope="prototype">
        <property name="service" ref="marksheetService"></property>
    </bean>

    <bean id="LoginAction" class="in.co.sunrays.proj1.action.LoginAction"
        scope="prototype">
        <property name="service" ref="userService"></property>
        <property name="roleService" ref="roleService"></property>
    </bean>

    <bean id="LogoutAction" class="in.co.sunrays.proj1.action.LogoutAction"
        scope="prototype">
    </bean>

    <bean id="MarksheetAction" class="in.co.sunrays.proj1.action.MarksheetAction"
        scope="prototype">
        <property name="service" ref="marksheetService"></property>
        <property name="studentService" ref="studentService"></property>
    </bean>

    <bean id="MarksheetListAction" class="in.co.sunrays.proj1.action.MarksheetListAction"
        scope="prototype">
        <property name="service" ref="marksheetService"></property>
    </bean>

    <bean id="MyProfileAction" class="in.co.sunrays.proj1.action.MyProfileAction"
        scope="prototype">
        <property name="service" ref="userService"></property>
    </bean>

    <bean id="RoleAction" class="in.co.sunrays.proj1.action.RoleAction"
        scope="prototype">
        <property name="service" ref="roleService"></property>
    </bean>

    <bean id="RoleListAction" class="in.co.sunrays.proj1.action.RoleListAction"
        scope="prototype">
        <property name="service" ref="roleService"></property>
    </bean>

    <bean id="StudentAction" class="in.co.sunrays.proj1.action.StudentAction"
        scope="prototype">
        <property name="service" ref="studentService"></property>
        <property name="collegeService" ref="collegeService"></property>
    </bean>

    <bean id="StudentListAction" class="in.co.sunrays.proj1.action.StudentListAction"
        scope="prototype">
        <property name="service" ref="studentService"></property>
    </bean>

    <bean id="UserAction" class="in.co.sunrays.proj1.action.UserAction"
        scope="prototype">
        <property name="service" ref="userService"></property>
        <property name="roleService" ref="roleService"></property>
    </bean>

    <bean id="UserListAction" class="in.co.sunrays.proj1.action.UserListAction"
        scope="prototype">
        <property name="service" ref="userService"></property>
    </bean>
<bean id="UserRegistrationAction" class="in.co.sunrays.proj1.action.UserRegistrationAction"
        scope="prototype">
        <property name="service" ref="userService"></property>
        <property name="roleService" ref="roleService"></property>
    </bean>

</beans>
Comments