SpringBoot学习笔记(4)

打开项目的resources目录,新建 shiro-spring.xml 文件,添加以下内容




    
    
        
        
    

    
    
        
        
        
        
        
        
        
        

        
        
            
                /login.action = anon
                /css/** = anon
                /dist/** = anon
                /fonts/** = anon
                /img/** = anon
                /js/** = anon
                / = anon
                /logout = logout
                /** = authc
            
        
    

    
    
        
    

    
        
    

    

    
    
        
            
                index
                index
            
        
    

    
    
    


新建XMLConfig类

package com.lanshiqin.cmsboot.core.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

/**
 * 导入工程的xml配置文件
 */
@Configuration
@ImportResource("classpath:shiro-spring.xml")
public class XmlConfig {
}


你可能感兴趣的:(SpringBoot学习笔记(4))