WebRoot/WEB-INF/classes/beans_sql2000.xml

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:tx="http://www.springframework.org/schema/tx"
    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.5.xsd            http://www.springframework.org/schema/context            http://www.springframework.org/schema/context/spring-context-2.5.xsd            http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd            http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
    <!--这个配置项会扫描这个包下的类 它子包下面的类也会被扫描到 需要在类前面加上注解@Service 就会交给Spring容器来处理了-->
    <context:component-scan base-package="com"/>
    <tx:annotation-driven transaction-manager="transactionManager"/>
    <bean class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" id="dataSource">
        <property name="driverClassName" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
        <property name="url" value="jdbc:microsoft:sqlserver://localhost:1433;databaseName=base"/>
        <property name="username" value="sa"/>
        <property name="password" value="sa"/>
        <property name="initialSize" value="1"/>
        <property name="maxActive" value="500"/>
        <property name="maxIdle" value="2"/>
        <property name="minIdle" value="1"/>
    </bean>
    <bean class="org.springframework.jdbc.support.lob.DefaultLobHandler"
        id="lobHandler" lazy-init="true"/>
    <bean class="org.springframework.orm.hibernate3.LocalSessionFactoryBean" id="sessionFactory">
        <property name="dataSource" ref="dataSource"/>
        <property name="lobHandler" ref="lobHandler"/>
        <property name="mappingResources">
            <list>
                <!-- 系统配置  START-->
                <value>com/sys/admin/entity/SysAdmin.hbm.xml</value>
                <value>com/sys/admin/entity/FileEntity.hbm.xml</value>
                <!-- 系统配置  END-->
                <!-- 插件配置  START-->
                <!-- <value>com/sys/plugin/announce/Announce.hbm.xml</value> -->
                <!-- <value>com/sys/plugin/file/JFile.hbm.xml</value> -->
                <!-- <value>com/sys/plugin/msgboard/Message.hbm.xml</value> -->
                <!-- 插件配置  END-->
                <value>/com/pro/entity/News.hbm.xml</value>
                <value>/com/pro/entity/Test.hbm.xml</value>
                <value>/com/pro/entity/Topic.hbm.xml</value>
                <value>/com/pro/entity/Wiki.hbm.xml</value>
            </list>
        </property>
        <property name="hibernateProperties">
            <value>
					hibernate.dialect=org.hibernate.dialect.SQLServerDialect
					hibernate.show_sql=true
					hibernate.hbm2ddl.auto=update
					hibernate.format_sql=false
					
                <!--  openSessionInView 需要加的属性
					hibernate.current_session_context_class=thread
					-->
            </value>
        </property>
    </bean>
    <bean class="org.springframework.orm.hibernate3.HibernateTransactionManager" id="transactionManager">
        <property name="sessionFactory" ref="sessionFactory"/>
    </bean>
    <tx:annotation-driven transaction-manager="txManager"/>
    <!-- 持久层DAO -->
    <!-- 业务层DAO -->
后面还有 1 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。