ssh框架的项目全纪录(二)

2014-11-24 02:53:00 · 作者: · 浏览: 1
fo.hbm.xml
cn/citic/trade/trade/bean/MerchantTradeInfoTemp.hbm.xml
cn/citic/trade/trade/bean/SecondCountInfo.hbm.xml
cn/citic/trade/credit/bean/CreditSummonsInfo.hbm.xml
cn/citic/trade/merchant/bean/MccMainbiz.hbm.xml
cn/citic/trade/trade/bean/MerchantSummaryByMonths.hbm.xml

cn/citic/trade/permission/bean/PermissionOperate.hbm.xml
cn/citic/trade/permission/bean/PermissionRole.hbm.xml
cn/citic/trade/permission/bean/PermissionGroup.hbm.xml
cn/citic/trade/permission/bean/PermiessionGroupRole.hbm.xml
cn/citic/trade/permission/bean/PermissionRoleOperate.hbm.xml
cn/citic/trade/report/bean/BankIncomeAccount.hbm.xml
cn/citic/trade/report/bean/BankFeeIncome.hbm.xml
cn/citic/trade/aerra/bean/AerraTradeInfo.hbm.xml





hibernate.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.hbm2ddl.auto=update
hibernate.show_sql=false
hibernate.format_sql=false





class="org.springframework.orm.hibernate3.HibernateTransactionManager">

























2.4 某个模块的springBean配置文件

这里配置的是这个模块的action申明 接口实现类申明 然后用spring进行注入,以后直接调用配置文件里面的id名字,就可以实现这些类,也不用自己申明,服务器在启动的时候,已经找到这些配置文件进行实例化了,注入就可以使用

Xml代码
< xml version="1.0" encoding="UTF-8" >
http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
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">



class="cn.citic.trade.aerra.service.impl.AerraTradeServiceBean" />



scope="prototype" />




2.5 log4j.properties配置文件
加入log4j的lib之后,通过这个配置文件,就可以使用log4j来打印log了。只需要在程序里这样:
Java代码
private static final Log log = LogFactory.getLog(AerraTradeAction.class);

log.warn()
or
log.info()

就可以使用了

Xml代码
# Logger - 日志写出器,供程序员输出日志信息
#log4j.rootLogger=DEBUG,CONSOLE,FILE,ROLLING_FILE,DATABASE,MAIL
log4j.rootLogger=INFO,CONSOLE,DRF 这里配置打印类型,加上info 就可以打印log.info的信息了,没加的不显示
#log4j.rootLogger=ERROR,CONSOLE
#log4j.rootLogger=WARN,CONSOLE,FILE,ROLLING_FILE,DATABASE,MAIL
#log4j.rootLogger=ERROR,CONSOLE,FILE,ROLLING_FILE,DATABASE,MAIL
#log4j.rootLogger=FATAL,CONSOLE,FILE,ROLLING_FILE,DATABASE,MAIL

# CONSOLE
# ConsoleAppender - 目的地为控制台的Appender
log4j.appender.CONSOLE=org