SpringMVC3 + apache CXF + spring security3 + mybatis3 (proxool) Integration Project

Source: Internet
Author: User

SpringMVC3 + apache CXF + spring security3 + mybatis3 (proxool) Integration Project

There are many problems in integration, so we will not discuss them here. Let's cultivate each other. Here I only provide the demo shelf package, which can be used to solve problems. Here I will explain why there is a framework like this: our project requires that we provide permission authentication and Management (web service) for subsystems and manage permissions for these web services at the same time. Therefore, in the demo, url and method-level authentication is extended for security, but no specific implementation is made.


1. web. xml

 
   
  
   Archetype Created Web Application
     
          
   
    CXFServlet
           
   
    org.apache.cxf.transport.servlet.CXFServlet
   
   
    2
       
      
          
   
    CXFServlet
           
   
    /ws/*
       
      
           
   
    contextConfigLocation
           
   
    /WEB-INF/spring/*.xml
       
      
          
   
    org.springframework.web.context.ContextLoaderListener
       
      
            
   
    springSecurityFilterChain
             
   
                  org.springframework.web.filter.DelegatingFilterProxy          
        
        
            
   
    springSecurityFilterChain
             
   
    /*
         
  
  
   
    spring
   
   
    org.springframework.web.servlet.DispatcherServlet
   
   
    1
   
  
  
   
    spring
   
   
    /
   
  
  
   
    default
   
   
    *.jpg
   
  
  
   
    default
   
   
    *.png
   
  
  
   
    default
   
   
    *.gif
   
  
  
   
    default
   
   
    *.ico
   
  
  
   
    default
   
   
    *.gif
   
  
  
   
    default
   
   
    *.js
   
  
  
   
    default
   
   
    *.css
   
  
  
   
    500
   
   
    /500.jsp
   
  
  
   
    404
   
   
    /404.jsp
   
  
  
   
    403
   
   
    /403.jsp
   
  
 
2. spring. xml
 
  
  
  
   
       
             
            
        
   
  
   
    
     
    
   
  
 

3. applicationContext. xml

 
 
  
   
  
  
  
  
  
  
  
          
           
           
           
               
            
          
   
   
  
  
   
   
   
  
  
   
  
  
  
   
      
  
   
   
   
   
   
  
  
   
  
  
   
  
  
  
   
  
  
  
      
           
    
     
Com. mysql. jdbc. Driver
        
       
           
    
     
Jdbc: mysql: // 10.10.8.8: 3307/aaa? CharacterEncoding = utf8
        
       
       
       
       
       
       
       
       
       
       
   
  
  
  
   
   
  
  
   
   
  
  
  
   
  
  
   
 

4. cxf-beans.xml


 
  
            
            
       
  
 

Related Article

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.