首页>代码>spring+spring boot+mybatis+shiro+thymeleaf实现社区党务后台管理系统>/PartyAffairs/Backstage/src/main/java/com/dai/party/config/BackstageDefaultView.java
package com.dai.party.config; import com.dai.party.tool.uploader.Uploader; import lombok.extern.slf4j.Slf4j; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportResource; import org.springframework.core.Ordered; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; /** * @program: partyAffairs * @description: 项目后台默认视图配置 * @author: Dai Yuanchuan * @create: 2019-01-11 00:21 **/ @Configuration @ImportResource(locations = {"classpath:spring-shiro.xml"}) @Slf4j public class BackstageDefaultView extends WebMvcConfigurationSupport { @Override public void addViewControllers(ViewControllerRegistry registry) { // 默认页面 registry.addViewController("/").setViewName("forward:/backstage/login"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); super.addViewControllers(registry); } /** * 继承 WebMvcConfigurationSupport 需要重写此方法 映射 路径 * * @param registry */ @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { // 静态文件 registry.addResourceHandler("/**") .addResourceLocations("classpath:/static/"); // 设置上传时文件路径 Uploader.setPath(registry); } }

泓鼎168 LV20
2024年6月12日
小温ggggg LV6
2023年10月24日
爱吃鱼的猫Vital LV6
2023年7月31日
suyuquan LV2
2023年7月31日
happyMrLi LV5
2023年7月31日
yunYUN123 LV1
2023年2月26日
taowufeng2 LV8
2022年12月9日
翰昌之杰2 LV6
2022年11月30日
1025490081 LV2
2022年11月9日
wylwylqq LV6
2022年11月6日

zhanghna799 LV3
3月10日
陈小灏 LV18
2月18日
沈从文 LV3
2024年12月8日
15719908287 LV9
2024年9月27日
hmf1989
2024年9月26日
暂无贡献等级
lo8lukoukoum LV4
2024年9月26日
happySuperman LV2
2024年6月4日
1941549176 LV4
2024年5月9日
shuangfu LV25
2024年5月7日
刘孟飞 LV22
2024年4月14日