Maven下SSM框架搭建-下

汉语版(E-version)

具体内容如下(Here are the contens):

【6】配置Spring Mvc(config spring-mvc.xml)

  
  
     
      
       
      
    
                 
    
    
    
        
            
        
    
    
       
      
          
      
    
    
    
      
      
      
    
    
  


    
       
        
        
    
    
    
    
        
        
            
             
             UTF-8    
             UTF-8      
              
        
    



    
        
        
         
 
 
 

 
     


【7】配置velocity属性

velocimacro.permissions.allow.inline=true  
velocimacro.permissions.allow.inline.to.replace.global=true  
velocimacro.permissions.allow.inline.local.scope=true  
resource.loader=webapp, class  
class.resource.loader.description=Velocity Classpath Resource Loader  
class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader  
webapp.resource.loader.class=org.apache.velocity.tools.view.WebappResourceLoader  
webapp.resource.loader.path=/WEB-INF/velocity/templates/
webapp.resource.loader.cache=false


【8】配置Spring Mybatis 

 






































































     
     
     
     
     
     





    
                    
        
    
  

【9】配置mybatis.xml




    
         
    
   

【10】构建Java下的包与mybatis文件夹下的文件













【11】配置web.xml









Archetype Created Web Application




encodingFilter
org.springframework.web.filter.CharacterEncodingFilter

encoding
UTF-8



encodingFilter
/





org.springframework.web.context.ContextLoaderListener


  
      
        org.springframework.web.util.IntrospectorCleanupListener  
     




spring mvc servlet
springMvc
org.springframework.web.servlet.DispatcherServlet

spring mvc config
contextConfigLocation
classpath:spring-mvc.xml

1


springMvc
/*





spring mybatis config
contextConfigLocation
classpath:spring-mybatis.xml





/index.html





30


----------------------------------------------------------------------------------------------------------------------------------------------

git分享:https://gitee.com/tostronger/

你可能感兴趣的:(Java,Web,java,spring,框架,maven,spring,mvc)