一个网上的Spring配置文件

转载 2007年09月23日 11:12:00
<?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:util="http://www.springframework.org/schema/util"
        xmlns:lang="http://www.springframework.org/schema/lang"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xmlns:jee="http://www.springframework.org/schema/jee"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
        http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
        http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.0.xsd">
       
        <!-- サーバ用メッセージ -->
        <bean id="messageResource" class="jp.co.ntt.dc.framework.common.msg.MessageResource" />
        <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
            <property name="useCodeAsDefaultMessage" value="true" />
            <property name="basenames">
                <list>
                    <value>messages</value>
                    <value>common-messages</value>
                </list>
            </property>
        </bean>

        <!-- システム設定 -->
        <bean id="globalProperty" class="jp.co.ntt.dc.framework.server.common.GlobalProperties"
            factory-method="getInstance">
            <property name="operator">
                <bean class="jp.co.ntt.dc.framework.server.common.SystemPropertiesOperator" parent="daoBase" />
            </property>
        </bean>
        <!-- システム設定用DAO -->
        <bean name="propertiesOperator" class="jp.co.ntt.dc.framework.server.common.SystemPropertiesOperator"
            parent="daoBase" />

        <!-- SQLリソース -->
        <bean id="sqlResource" class="jp.co.ntt.dc.framework.server.config.SQLResource" init-method="init">
            <property name="locations">
                <list>
                    <value>classpath:fw.hql.xml</value>
                    <value>classpath:equip.hql.xml</value>
                    <value>classpath:filter.hql.xml</value>
                    <value>classpath:job.hql.xml</value>
                    <value>classpath:kdm.hql.xml</value>
                    <value>classpath:key.hql.xml</value>
                    <value>classpath:license.hql.xml</value>
                    <value>classpath:log.hql.xml</value>
                    <value>classpath:manage.hql.xml</value>
                    <value>classpath:master.hql.xml</value>
                    <value>classpath:theater.hql.xml</value>
                    <value>classpath:theaterstatus.hql.xml</value>
                    <value>classpath:common.hql.xml</value>
                    <value>classpath:sequence.hql.xml</value>
                </list>
            </property>
        </bean>

        <!-- フレームワーク用設定 -->
        <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
            <property name="locations">
                <list>
                    <value>classpath:system.properties</value>
                </list>
            </property>
        </bean>

        <!-- データソースの設定 -->
        <jee:jndi-lookup id="dataSource" jndi-name="java:XADS/SecurityCenter"/>

        <!-- Hibernate SessionFactory -->
        <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
            <property name="dataSource" ref="dataSource" />
            <property name="hibernateProperties">
                <props>
                    <prop key="hibernate.dialect">${hibernate.dialect}</prop>
                    <prop key="hibernate.show_sql">true</prop>
                </props>
            </property>

            <!-- Must references all OR mapping files.-->
            <property name="mappingResources">
                <list>
                    <value>common.xml</value>
                    <value>securityCenter.xml</value>
                </list>
            </property>
        </bean>

        <!-- トランザクションの設定 -->
        <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager" />
        <tx:advice id="transactionAdvice" transaction-manager="transactionManager">
            <tx:attributes>
                <tx:method name="execute" />
                <tx:method name="send" />
            </tx:attributes>
        </tx:advice>

        <!-- トランザクション用AOPの設定 -->
        <aop:config>
            <aop:pointcut id="businessLogic"
                expression="execution(* jp.co.ntt.dc.framework.server.action.IActionBase.execute(..))" />
            <aop:advisor advice-ref="transactionAdvice" pointcut-ref="businessLogic" />
        </aop:config>

        <!-- DBアクセスヘルプ -->
        <bean id="dbHelper" class="jp.co.ntt.dc.framework.server.dao.DBAccessHelper">
            <property name="sessionFactory" ref="sessionFactory" />
        </bean>

        <!-- DAOの親クラス -->
        <bean id="daoBase" class="jp.co.ntt.dc.framework.server.dao.IDaoBase" abstract="true">
            <property name="dbHelper" ref="dbHelper" />
        </bean>

        <!-- Actionの親クラス -->
        <bean id="actionBase" class="jp.co.ntt.dc.framework.server.action.IActionBase" abstract="true">
            <property name="daoMap">
                <map>
                    <entry key="masterDAO">
                        <ref bean="masterDAO" />
                    </entry>
                    <entry key="CommonDAO">
                        <ref bean="CommonDAO" />
                    </entry>
                </map>
            </property>
        </bean>

        <!-- マスタテーブル用DAO -->
        <bean name="masterDAO" class="jp.co.ntt.dc.business.server.sc.common.dao.MasterDao" parent="daoBase" />

        <!-- システム共通DAO -->
        <bean name="CommonDAO" class="jp.co.ntt.dc.framework.server.dao.CommonDao" parent="daoBase" />

        <!-- Validateアクション -->
        <bean name="/ActionValidate" class="jp.co.ntt.dc.framework.server.action.ActionValidate" init-method="init">
            <property name="actionValidateDAO">
                <ref bean="actionValidateDAO" />
            </property>
        </bean>
        <!-- Validateアクション用のDAO -->
        <bean name="actionValidateDAO" class="jp.co.ntt.dc.framework.server.dao.ActionValidateDao" parent="daoBase" />

        <!-- RMIのサービス -->
        <bean name="remotingService" class="jp.co.ntt.dc.framework.server.handler.RemotingController">
            <property name="handlerMapping" ref="remotingMapping" />
        </bean>
        <!-- RMI Mapping -->
        <bean name="remotingMapping" class="jp.co.ntt.dc.framework.server.handler.HandlerMapping" />
        <!-- アクションの自動登録Bean -->
        <bean class="jp.co.ntt.dc.framework.server.handler.ActionBeanAutoRegistrant">
            <property name="handlerMapping" ref="remotingMapping" />
        </bean>
        <!-- RMIのインタフェース -->
        <bean name="/RemotingService" class="jp.co.ntt.dc.framework.server.handler.CenterAppHttpInvokerServiceExporter">
            <property name="service" ref="remotingService" />
            <property name="serviceInterface" value="jp.co.ntt.dc.framework.common.service.IRemotingService" />
        </bean>

        <!-- **Http Invokers Client** -->
        <!-- **Http Invokers FactoryBean** -->
        <bean id="remotingFactoryBean" class="jp.co.ntt.dc.framework.common.remoting.DCHttpInvokerProxyFactoryBean">
            <property name="serviceUrl"
                value="http://${server.ip}:${server.port}/${server.module}/${server.service.remoting}" />
            <property name="serviceInterface" value="jp.co.ntt.dc.framework.common.service.IRemotingService" />
        </bean>

        <!-- **Http Invokers RemotingProxy** -->
        <bean id="remotingProxy" class="jp.co.ntt.dc.framework.server.remoting.RemotingProxy">
            <property name="remotingFactoryBean" ref="remotingFactoryBean" />
            <property name="context" ref="context" />
        </bean>

        <!-- **Http Invokers Client Helper** -->
        <bean id="remotingHelper" class="jp.co.ntt.dc.framework.server.remoting.RemotingHelper">
            <property name="remotingProxy" ref="remotingProxy" />
        </bean>

        <!-- **Context** -->
        <bean id="context" class="jp.co.ntt.dc.framework.server.context.DCContext">
            <property name="defaultUserId" value="${default.userid}" />
            <property name="defaultUserPswd" value="${default.password}" />
            <property name="jndiMap">
                <map>
                    <entry key="java.naming.factory.initial" value="${java.naming.factory.initial}" />
                    <entry key="java.naming.factory.url.pkgs" value="${java.naming.factory.url.pkgs}" />
                    <entry key="java.naming.provider.url" value="${java.naming.provider.url}" />
                </map>
            </property>
        </bean>

    </beans>
 

springMVC+hibernate+spring干净的一个配置文件

config包下有三个配置文件:spring-core、spring-hibernate、spring-servlet。 首先是spring-core.xml(是首先加载的spring上下文配置文件...

Spring portlet 配置文件 一个问题

spring配置portlet比较简单 portlet.xml一般放到WEB-INF下面:

一个典型的Spring的applicationcontext.xml配置文件

xml version="1.0" encoding="UTF-8"?> beans     xmlns="http://www.springframework.org/schema/beans"...
  • okkeqin
  • okkeqin
  • 2013年02月28日 14:53
  • 546

spring boot 配置文件后缀的一个坑

Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationEx...
  • mzh1992
  • mzh1992
  • 2016年12月29日 18:24
  • 5224

一个典型的Spring的applicationcontext.xml配置文件

网上找的c语言读取配置文件

[代码] CException.h view source print? 01 /********************************************************...

mysql的一个配置文件

  • 2009年03月19日 12:07
  • 901B
  • 下载

Tomcat服务器配置文件server.xml的配置解析及Context的配置(网上文档的学习整理)

server.xml配置文件解析 以下是这个文件中的基本配置信息: server: port 指定一个端口,这个端口负责监听关闭tomcat的请求 shutdown 指定向端...

一个相对完整的emacs配置文件

  • 2013年07月25日 10:52
  • 4KB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:一个网上的Spring配置文件
举报原因:
原因补充:

(最多只允许输入30个字)