S2SH集成maven配置

struts2,spring,hibernate集成配置文件,供大家参考。

maven配置:

       

       

4.0.9.RELEASE




junit
junit
4.11
test





org.apache.openejb
javaee-api
5.0-1
provide


javax.faces
jsf-api
1.2_04
provide


javax.servlet
jstl
1.2
provide


javax.servlet.jsp
jsp-api
2.1
provide


javax.faces
jsf-impl
1.2_04
provide




org.apache.struts
struts2-core
2.3.20
jar


javassist
javassist
3.12.1.GA
jar



asm
asm-commons
2.2.3
jar


asm
asm
2.2.3
jar


org.springframework
spring-core
${spring.version}
jar


org.springframework
spring-web
${spring.version}
jar


org.springframework
spring-orm
${spring.version}
jar


org.springframework
spring-jdbc
${spring.version}
jar


org.springframework
spring-context
${spring.version}
jar


org.springframework
spring-aop
${spring.version}
jar


org.springframework
spring-expression
${spring.version}
jar


org.springframework
spring-test
${spring.version}
jar



org.springframework
spring-tx
${spring.version}
jar


org.springframework
spring-webmvc
${spring.version}
jar


net.sourceforge.cglib
com.springsource.net.sf.cglib
2.1.3
jar


org.springframework.security
spring-security-config
3.2.3.RELEASE


aspectj
aspectjweaver
1.5.4


org.apache.struts
struts2-spring-plugin
2.3.20
jar



mysql
mysql-connector-java
5.1.14
jar




c3p0
c3p0
0.9.1.2





org.hibernate
hibernate-core
4.3.8.Final


org.eclipse.persistence
javax.persistence
2.1.0
jar



cglib
cglib
2.2





org.hibernate
hibernate-entitymanager
4.3.8.Final




log4j
log4j
1.2.16
jar


org.slf4j
slf4j-api
1.6.1
jar


org.slf4j
slf4j-log4j12
1.6.1
jar





commons-io
commons-io
2.2


javassist
javassist
3.12.1.GA


ognl
ognl
3.0.6



${basedir}/src
${basedir}/WebRoot/WEB-INF/classes


${basedir}/src

**/*.java





maven-war-plugin

${basedir}/WebRoot
${basedir}/WebRoot



maven-compiler-plugin
2.0.2

1.7
1.7



org.apache.tomcat.maven
tomcat7-maven-plugin
2.2


platform

web.xml文件配置:



contextConfigLocation
classpath:spring/applicationContext.xml
 


    
     
     
       org.springframework.web.context.ContextLoaderListener 
   



 
 
   encodingFilter
   org.springframework.web.filter.CharacterEncodingFilter
  
      encoding
      UTF-8
  

 

 
   encodingFilter
   /*
 

 
       
     
       struts2 
        
           org.apache.struts2.dispatcher.FilterDispatcher  
       
 
   
 
     
       struts2 
       /* 
   


spring 配置文件:


xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p"
xmlns:util="http://www.springframework.org/schema/util" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:cache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="  
    http://www.springframework.org/schema/context  
    http://www.springframework.org/schema/context/spring-context-3.2.xsd  
    http://www.springframework.org/schema/beans  
    http://www.springframework.org/schema/beans/spring-beans-3.2.xsd  
    http://www.springframework.org/schema/tx  
    http://www.springframework.org/schema/tx/spring-tx-3.2.xsd  
    http://www.springframework.org/schema/jdbc  
    http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd  
    http://www.springframework.org/schema/cache  
    http://www.springframework.org/schema/cache/spring-cache-3.2.xsd  
    http://www.springframework.org/schema/aop  
    http://www.springframework.org/schema/aop/spring-aop.xsd  
    http://www.springframework.org/schema/util  
    http://www.springframework.org/schema/util/spring-util.xsd">






destroy-method="close">

value="jdbc:mysql://localhost:3306/basicplatform?useUnicode=true&characterEncoding=UTF-8">






















class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">



 
 
             
                org.hibernate.dialect.MySQLDialect  
                true  
           
 
       
 
         
         
             
                com.loveconnect.base.login.domain  
           
 
       
 










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






























expression="execution(* com.loveconnect..*.service..*.*(..)) " />



struts配置文件:


"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">

        
           
  /test.html
 

       


你可能感兴趣的:(S2SH)