天天看點

若依 修改預設跳轉頁面

配置說明:需要操作的地方有兩處,分别是

application.yml

ShiroConfig.java(com.ruoyi.framework.config.ShiroConfig#shiroFilterFactoryBean)

// 讓shiro不攔截路徑“/”,不加則會自動跳轉到登陸頁面
filterChainDefinitionMap.put("/", "anon");      
// 這裡我是用的首頁是/web/index
// 使用“/web/**”是将以“/web/”為字首的請求設定為匿名通路
// 如果不設定,通路/web/index則會跳轉到登陸頁面
filterChainDefinitionMap.put("/web/**", "anon");      
# 這是是将首頁跳轉位址修改到/web/index上
shiro:
  user:
    indexUrl: /web/index