Maven integration Spring, Spring mvc4.1.6, and Hibernate4.3.10 project construction Summary

Source: Internet
Author: User

Maven integration Spring, Spring mvc4.1.6, and Hibernate4.3.10 project construction Summary

First, let's take a look at the detailed configuration file and the description above, so that you can have a clearer understanding of the project after reading the example.

The functional modules of this framework mainly include the following functional packages:

GuavaAspectJapache commonlogSpringHibernatePOIjacksonoraclequartz

1. web. xml

 

 
 
  
   
Myapp
  
  
  
   
    
ContextConfigLocation
   
   
    
/WEB-INF/applicationContext. xml
   
  
  
  
   
    
Org. springframework. web. context. ContextLoaderListener
   
  
  
  
   
    
SpringServlet
   
   
    
Org. springframework. web. servlet. DispatcherServlet
   
   
    
     
ContextConfigLocation
    
    
     
/WEB-INF/spring-mvc.xml
    
   
   
    
     
Spring. profiles. active
    
    
     
Production
    
   
   
    
1
   
  
  
   
    
SpringServlet
   
   
    
/
   
  
  
  
   
    
Set Character Encoding
   
   
    
Org. springframework. web. filter. CharacterEncodingFilter
   
   
    
     
Encoding
    
    
     
UTF-8
    
   
   
    
     
ForceEncoding
    
    
     
True
    
   
  
  
   
    
Set Character Encoding
   
   
    
/*
   
  
  
  
   
    
20
   
  
  
   
    
Index. jsp
   
  
 
2. applicationContext. xml

 

 

 
 
  
   
  
  
  
   
   
   
   
  
  
   
    
   
   
    
     
      org.easy.java
     
    
   
   
    
     
      org.hibernate.dialect.Oracle10gDialect
     
     
      none
     
     
      true
     
     
      none
     
     
      false
     
    
   
  
  
   
    
   
   
  
 
3, spring-mvc.xml

 

 

 
 
  
  
   
  
  
   
    
     
      
       
        
         
          
         
       
       
        
         
          
           
          
         
        
       
       
        
         
        
       
      
     
    
   
  
 
4. pom. xml

 

 

 
  
   4.0.0
  
  
   org.easy.java
  myapp
  
   war
  
  
   0.0.1-SNAPSHOT
  
  
   myapp Maven Webapp
  
  
   http://maven.apache.org
  
  
   
    
     javax.servlet
    servlet-api
    
     2.5
    
    
     provided
    
   
   
    
     javax.servlet.jsp
    jsp-api
    
     2.1
    
    
     provided
    
   
   
    
     taglibs
    standard
    
     1.1.2
    
   
   
    
     javax.servlet
    jstl
    
     1.2
    
   
   
    
     com.google.guava
    guava
    
     15.0-rc1
    
   
   
   
    
     org.aspectj
    aspectjrt
    
     1.7.4
    
   
   
    
     org.aspectj
    aspectjweaver
    
     1.7.4
    
   
   
   
    
     commons-logging
    commons-logging
    
     1.2
    
   
   
    
     commons-lang
    commons-lang
    
     2.6
    
   
   
    
     org.apache.commons
    commons-collections4
    
     4.0
    
   
   
    
     commons-beanutils
    commons-beanutils
    
     1.8.3
    
   
   
    
     commons-fileupload
    commons-fileupload
    
     1.3.1
    
   
   
    
     commons-dbcp
    commons-dbcp
    
     1.4
    
   
   
    
     commons-pool
    commons-pool
    
     1.6
    
   
   
   
    
     log4j
    log4j
    
     1.2.14
    
   
   
    
     org.slf4j
    slf4j-log4j12
    
     1.7.2
    
   
   
   
    
     org.springframework
    spring-core
    
     4.1.6.RELEASE
    
   
   
    
     org.springframework
    spring-web
    
     4.1.6.RELEASE
    
   
   
    
     org.springframework
    spring-aspects
    
     4.1.6.RELEASE
    
   
   
    
     org.springframework
    spring-webmvc
    
     4.1.6.RELEASE
    
   
   
    
     org.springframework
    spring-context
    
     4.1.6.RELEASE
    
   
   
    
     org.springframework
    spring-tx
    
     4.1.6.RELEASE
    
   
   
    
     org.springframework
    spring-orm
    
     4.1.6.RELEASE
    
   
   
    
     org.springframework
    spring-messaging
    
     4.1.6.RELEASE
    
   
   
    
     org.springframework
    spring-jdbc
    
     4.1.6.RELEASE
    
   
   
   
    
     org.hibernate
    hibernate-core
    
     4.3.10.Final
    
   
   
    
     org.hibernate
    hibernate-c3p0
    
     4.3.10.Final
    
   
   
    
     org.hibernate
    hibernate-ehcache
    
     4.3.10.Final
    
   
   
    
     org.hibernate
    hibernate-osgi
    
     4.3.10.Final
    
   
   
    
     org.hibernate
    hibernate-envers
    
     4.3.10.Final
    
   
   
    
     org.hibernate
    hibernate-entitymanager
    
     4.3.10.Final
    
   
   
   
    
     org.apache.poi
    poi-ooxml
    
     3.12
    
   
   
   
    
     com.fasterxml.jackson.core
    jackson-core
    
     2.1.0
    
   
   
    
     com.fasterxml.jackson.core
    jackson-databind
    
     2.1.0
    
   
   
    
     com.fasterxml.jackson.core
    jackson-annotations
    
     2.1.0
    
   
   
   
    
     com.oracle
    ojdbc14
    
     10.2.0.4.0
    
   
   
   
    
     org.quartz-scheduler
    quartz
    
     2.2.0
    
   
   
    
     org.apache.maven.plugins
    maven-resources-plugin
    
     2.4.3
    
   
  
  
   
    myapp
   
   
    
     
      org.apache.maven.plugins
     maven-compiler-plugin
     
      2.3.2
     
     
      1.7
      
       1.7
      
     
     
     
    
    
    
    
   
   
   
   
   
  
  
  
  
  
  
 
Note the following: I hope you will be aware that there are a lot of changes to be made in the development process, and there are a lot of changes. I don't need to use the performance, so I did a simple test, it is much better than the previous one.

 

Note

1. Spring4.1.6 discards the previous class and uses MappingJackson2JsonView to parse json. Com. fasterxml. jackson. core is used to replace jackson.

2. header file of the Spring configuration file The package version number is specified in the tag configuration.

3. sessinfactory is replaced by org. springframework. orm. hibernate4.LocalSessionFactoryBean version 4.

4. Change the transaction class to org. springframework. orm. hibernate4.HibernateTransactionManager.

5. Change the exception class to PersistenceExceptionTranslationPostProcessor.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.