springmvc+spring+hibernate+shiro+jbpm框架搭建

一、web.xml配置

1.配置字符集

2.配置spring的监听

3.加载spring,spring-hibernate配置文件

4.配置spring-mvc的配置文件

5.配置shiro权限的配置文件


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

       
            forceEncoding
            true
       

   

   
        encodingFilter
        /*
   


   
        org.springframework.web.context.ContextLoaderListener
   

   
       
        contextConfigLocation
       
            classpath*:/spring.xml
            classpath*:/spring-hibernate.xml
       

   



   
       
        springServlet
        org.springframework.web.servlet.DispatcherServlet
       
            contextConfigLocation
            classpath*:/spring-mvc.xml
       

        1
   

   
        springServlet
        /
   

   
        shiroFilter
        org.springframework.web.filter.DelegatingFilterProxy
       
            targetFilterLifecycle
            true
       

   

   
        shiroFilter
        /*
   

2.spring。xml的配置


   

   

   
       
                                        expression="org.springframework.web.bind.annotation.ControllerAdvice"/>
   


   

   
       
   


   
       
           
               
               
           

       

       
       
       
   


   
                          value="org.apache.shiro.SecurityUtils.setSecurityManager"/>
       
   


   
   
   
   
   

   
   
       
       
       
       
       
           
               
               
           

       

       
           
                /test/** = anon
                /api/v1/file/{id}/view/** = authcStateless
                /api/v1/file/** = skip
                /api/v1/auth/** = skip
                /api/v1/** = authcStateless
                /api/v1/repositories/mostUsed = perms[repository:view]
               

           

       

   


   
       
           
                /api/v1/auth/unauthorize
           

       

   

配置spring-hibernate



   
       
       
       

       
       
       
       
       
       
       
       

       
       

       
       
       
       


       
       
       
       

       
       
       
       
       
       

       
       
       
   


   
   
       
       
           
                thread
                ${hibernate.hbm2ddl.auto}
                ${hibernate.dialect}
                ${hibernate.show_sql}
                ${hibernate.format_sql}
           

       


       
       
           
                com.flash.db
               
               
           

       

   


   
       
   


   
   
       
   


   
   

   
   
       
           
           
           
           
           
           
           
           
           

           
           
           
           
           

           

           
       

   

   
       
       
   



   
       
       
       

       

   



   
   
   
       
   

   
       
           
       

       
            STANDALONE_LOCAL
       

   

   
   
       
           
               
                   
               

               
                    getLog1Path
               

           

       

       
           
               
                   
               

               
                    getLog2Path
               

           

       

   


              class="bitronix.tm.TransactionManagerServices" depends-on="btmConfig" destroy-method="shutdown"/>

   
       
       
   

   
   

   

   
       
            D:/b.bpmn
       

   


   
   
   
       
       
       
       
       
       
           
               
                   
               

               
                    getAsserts
               

           

       

   

   
       
       
   



   
       
   


   
       
       
       
       
           
               
                   
               

           

       

   

   
   

   
   
       
       
       
   


   
              init-method="onInit">
       
       
       
       
       
   


   
   
       
       
   


   
   
       
       
   


   
              depends-on="deploymentService">
       
       
            addListener
       

       
           
               
           

       

   

spring-mvc的配置文件

   
   
   
       
   

   
       
                                        expression="org.springframework.web.bind.annotation.ControllerAdvice"/>
       
   

   
       
           
           
               
           

           
           
               
           


       

   

   
              class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
       
       
       
   

config.properties的配置

hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
driverClassName=com.mysql.jdbc.Driver
validationQuery=SELECT 1
jdbc_url=jdbc:mysql://123.56.128.161:3307/bx?useUnicode=true&characterEncoding=utf-8
jdbc_username=root
jdbc_password=bnstar@2016

hibernate.hbm2ddl.auto=update
#hibernate.hbm2ddl.auto=none
hibernate.show_sql=true
hibernate.format_sql=false

sessionInfoName=sessionInfo

uploadFieldName=filedata
uploadFileMaxSize=20971520
uploadFileExts=txt,rar,zip,doc,docx,xls,xlsx,jpg,jpeg,gif,png,swf,wmv,avi,wma,mp3,mid
uploadDirectory=attached

你可能感兴趣的:(springmvc+spring+hibernate+shiro+jbpm框架搭建)