1.文档说明:
我的Csdn http://blog.csdn.net/zl563143188
spring3.1 http://static.springsource.org/spring/docs/3.1.0.M2/spring-framework-reference/html/
struts2 http://struts.apache.org/2.x/docs/home.html
hibernate http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/
工程名称codeFactory,请在百度网盘下载 codeFactory20130305 ,lib20130305两上文件,内有mysql数据源码。
企业级项目实战(带源码)地址: http://zz563143188.iteye.com/blog/1825168
收集五年的开发资料下载地址:
http://pan.baidu.com/share/link?shareid=372668&uk=4076915866#dir/path=%2F%E5%AD%A6%E4%B9%A0%E6%96%87%E4%BB%B6
最新项目开发文档地址 http://zz563143188.iteye.com/blog/1825168
功能介绍:
1.支持 Hibernate连接Access Hibernate连接sqlsever Hibernate连接mysql
2.支持 Spring连接access数据库 spring连接mysql spring连接sqlsever数据库
3.支持 Spring动态数据源加载 Spring连接ibaits Spring JDBC连接
4.支持 Spring的事务管理 Spring AOP实现 Spring的权限管理
5.支持 Spring MVC及Spring国际化标签 Spring文件上传下载
6.支持 Spring 数据源加载属性文件
7.支持 struts2+hibernate4+spring3 及struts2+itbaits+spring设计结构
8.支持 ext+json+treepanel实现动态树
9.支持 jasperreport+ireport+excel打印
10.支持 freemarker 生成文件
11.支持 sitemesh修饰网站
12. 支持 oscahe缓存 hibernate+ehcache缓存
13. 支持 struts2国际化
14 支持 velocity模板设计
15.支持 ext+dwr+json处理数据
16.支持 jquery图表制作
17.支持 log4j日志处理
18.支持 hibernate与ibaits同时访问数据库
19.支持 java读dll,ocx控制
20.支持 SSH、SSI框架同时使用
21.支持 Spring实时调度任务
22.支持随意更改BaseDaoImpl extends BaseHibernate4SpringDaoImpl
一、配置文件
1.spring的配置文件
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance " xmlns:aop="http://www.springframework.org/schema/aop "
xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr "
xmlns:mvc="http://www.springframework.org/schema/mvc " xmlns:tx="http://www.springframework.org/schema/tx "
xmlns:context="http://www.springframework.org/schema/context "
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.directwebremoting.org/schema/spring-dwr
http://www.directwebremoting.org/schema/spring-dwr-3.1.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd "
default-autowire="byName">
expression="org.springframework.stereotype.Controller" />
class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor">
class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor" />
class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping">
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" />
class="org.springframework.web.servlet.i18n.CookieLocaleResolver" />
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
classpath:jdbc.properties
classpath:msg/system/exception_zh_CN.properties
classpath:msg/system/message_en_US.properties
classpath:msg/system/message_zh_CN.properties
classpath:msg/senlo/senlo_en_US.properties
classpath:msg/senlo/senlo_zh_CN.properties
classpath:msg/config/config.properties
destroy-method="close">
class="com.senlo.analyze.core.interseptor.system.LoginInterceptor" />
expression="execution(public * com.senlo.analyze.core.common.dao..*.*(..))"
id="logPointcut" />
classpath:senlo-ibatis.config.xml
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
true
update
10
10
10
1
true
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
expression="execution(public * com.senlo.analyze.core.common.dao.Impl..*.*(..))" />
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
value="org.springframework.web.servlet.view.JstlView" />
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
classpath:msg.system.message
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
2.struts配置文件:
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
"http://struts.apache.org/dtds/struts-2.1.dtd ">
3.web.xml配置文件
version="2.5"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd ">
index.jsp
struts2
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
struts-cleanup
org.apache.struts2.dispatcher.ActionContextCleanUp
struts-cleanup
/*
struts2
/*
contextConfigLocation
/WEB-INF/classes/applicationContext.xml
org.springframework.web.context.ContextLoaderListener
encodingFilter
org.springframework.web.filter.CharacterEncodingFilter
encoding
UTF-8
forceEncoding
true
encodingFilter
/*
org.springframework.web.context.request.RequestContextListener
org.springframework.web.util.IntrospectorCleanupListener
hibernateFilter
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
singleSession
true
hibernateFilter
*.do
/spring
/WEB-INF/spring.tld
/spring
/WEB-INF/spring-form.tld
30
log4jConfigLocation
WEB-INF/classes/log4jSpring.properties
log4j-configuration
/WEB-INF/classes/log4j.properties
org.springframework.web.util.Log4jConfigListener
4.dwr配置文件:
"-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN"
"http://getahead.org/dwr/dwr20.dtd ">
value="com.xbs.crm.crm.biz.bizImpl.SensorbjBizImp">
5.ehache配置文件:
timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="true"
diskSpoolBufferSizeMB="30" maxElementsOnDisk="10000000"
diskPersistent="false" diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU" />
timeToIdleSeconds="3600" timeToLiveSeconds="7200" overflowToDisk="false" />
maxElementsInMemory="50" eternal="false" timeToIdleSeconds="3600"
timeToLiveSeconds="7200" overflowToDisk="false" />
maxElementsInMemory="5000" eternal="true" overflowToDisk="true" />
6.log4j配置文件
##log4j.rootLogger=DEBUG,CONSOLE,DATABASE,FILE,DATABASE
log4j.rootLogger=DEBUG,CONSOLE,FILE
log4j.addivity.org.apache=true
#
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=INFO
log4j.appender.CONSOLE.Target=System.out
log4j.appender.CONSOLE.Encoding=UTF-8
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=[framework] %d -%-4r [%t] %-5p %c %x - %m%n
log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.File=${catalina.base}/webapps/zl/logs/system.log
log4j.appender.A1.Encoding=UTF-8
log4j.appender.A1.Threshold=CONSOLE
log4j.appender.A1.DatePattern='.'yyyy-MM-dd
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{ABSOLUTE} %5p {1}:%L : %m%n
log4j.appender.FILE=org.apache.log4j.FileAppender
#log4j.appender.A1.File=WEB-INF\\logs\\bysxxglxt.log
#C:/log4j/file.log ${WORKDIR} ?tomcat webapp.root??
log4j.appender.FILE.File=${catalina.base}/webapps/zl/logs/system.log
log4j.appender.FILE.Append=false
log4j.appender.FILE.Encoding=UTF-8
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=[framework] %d -%-4r [%t] %-5p %c %x - %m%n
#
log4j.appender.ROLLING_FILE=org.apache.log4j.RollingFileAppender
log4j.appender.ROLLING_FILE.Threshold=ERROR
log4j.appender.ROLLING_FILE.File=rolling.log
log4j.appender.ROLLING_FILE.Append=true
log4j.appender.CONSOLE_FILE.Encoding=UTF-8
log4j.appender.ROLLING_FILE.MaxFileSize=10KB
log4j.appender.ROLLING_FILE.MaxBackupIndex=1
log4j.appender.ROLLING_FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.ROLLING_FILE.layout.ConversionPattern=[framework] %d -%-4r [%t] %-5p %c %x - %m%n
#Appender
#log4j.appender.im = net.cybercorlin.util.logger.appender.IMAppender
#log4j.appender.im.host = mail.cybercorlin.net
#log4j.appender.im.username = username
#log4j.appender.im.password = password
#log4j.appender.im.recipient =
#log4j.appender.im.layout=org.apache.log4j.PatternLayout
#log4j.appender.im.layout.ConversionPattern =[framework] %d -%-4r [%t] %-5p %c %x - %m%n
#???socket
#log4j.appender.SOCKET=org.apache.log4j.RollingFileAppender
#log4j.appender.SOCKET.RemoteHost=localhost
#log4j.appender.SOCKET.Port=5001
#log4j.appender.SOCKET.LocationInfo=true
# Set up for Log Facter 5
#log4j.appender.SOCKET.layout=org.apache.log4j.PatternLayout
#log4j.appender.SOCET.layout.ConversionPattern=[start]%d{DATE}[DATE]%n%p[PRIORITY]%n%x[NDC]%n%t[THREAD]%n%c[CATEGORY]%n%m[MESSAGE]%n%n
# Log Factor 5 Appender
#log4j.appender.LF5_APPENDER=org.apache.log4j.lf5.LF5Appender
#log4j.appender.LF5_APPENDER.MaxNumberOfRecords=2000
#
#log4j.appender.MAIL=org.apache.log4j.net.SMTPAppender
#log4j.appender.MAIL.Threshold=FATAL
#log4j.appender.MAIL.BufferSize=10
#log4j.appender.MAIL.From=
#log4j.appender.MAIL.SMTPHost=www.wusetu.com
#log4j.appender.MAIL.Subject=Log4J Message
#log4j.appender.MAIL.To=we
#log4j.appender.MAIL.layout=org.apache.log4j.PatternLayout
#log4j.appender.MAIL.layout.ConversionPattern=[framework] %d -%-4r [%t] %-5p %c %x - %m%n
7.struts2.property
struts.i18n.encoding=UTF-8
struts.custom.i18n.resources=msg.senlo.senlo,msg.system.message
struts.multipart.maxSize=1000000000
struts.devMode=fase
struts.url.includeParams=none
8.jdbc.property配置文件
#Oracle?????
#ConUsePool true use connection pool,false not use connection pool
ConUsePool=true
#DsName datasource name
#DsName=gtcs
#DbType:database type
#DbType=oracle---------------------------------------------------------------
#jdbc.driver=oracle.jdbc.driver.OracleDriver
#jdbc.url=jdbc:oracle:thin:@127.0.0.1:1521:ora9i
#jdbc.username=gtcs
#jdbc.password=11
#SQL Server------------------------------------------------------------------
#jdbc.driver=com.microsoft.jdbc.sqlserver.SQLServerDriver
#jdbc.url=jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=wpgl
#jdbc.username=sa
#jdbc.password=
#My SQL----------------------------------------------------------------------
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://127.0.0.1/anydata?useUnicode=true&characterEncoding=utf-8
jdbc.username=root
jdbc.password=root
#select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual
#Aceess----------------------------------------------------------------------
#jdbc.driver=sun.jdbc.odbc.JdbcOdbcDriver
#jdbc.url=jdbc\:odbc\:driver\={Microsoft Access Driver (*.mdb)};DBQ\=E\:\\workspace\\anydata003.mdb
#jdbc.username=
#jdbc.password=
#proxool db
#proxool.driver=oracle.jdbc.driver.OracleDriver
#proxool.url=jdbc:oracle:thin:@192.168.1.16:1521:ETLDBS
#proxool.username=report
#proxool.password=report
#proxool.alias=dbpool
#proxool.prototypeCount=5
#proxool.maximumConnectionCount=100
#proxool.minimumConnectionCount=10
9.ibaits配置文件:
lazyLoadingEnabled="true" maxRequests="32" maxSessions="20"
maxTransactions="10" useStatementNamespaces="true" />
- Spring_mvc_hibernate_freemarker_开源项目_.part2.rar (4.7 MB)
- 描述: 同由于网页排版不好看,我将上面内容做成PDF文档
- Spring_mvc_hibernate_freemarker_开源项目_.part1.rar (9.8 MB)
- 描述: 同由于网页排版不好看,我将上面内容做成PDF文档