🍅选题推荐——以防找不到我们,点击上方订阅专栏✌✌
2024年计算机Java Python安卓APP微信小程序asp.net项目PHP毕业设计2000个热门选题推荐计算机毕业设计如何选题?
安装Chatgdt搜索答辩老师常提的问题-----------------重点
👇🏻文末获取源码联系👇🏻
一、项目介绍
4.1 系统体系结构
系统启动后,在登录界面,输入正确的账号密码,选择进入管理员界面或用户界面,管理员界面是用来管理页面与用户信息,用户界面可以正常的使用,并对个人中心、考勤信息、新闻公告等进行份内的操作
管理员模块属于是网站的后台,进入之后有大量的管理员功能,管理员也可以使用用户模块的功能,为了维护网站的稳定与页面的布局,将管理员模块的功能详细化后可以使用系统管理对页面进行布局修改,可以发布公告提示用户规范,用户模块只可以修改个人信息,对考勤信息和新闻公告等进行查看等,基于人脸识别的考勤管理系统总体结构图如图4-2所示。
二、功能介绍
三、关键代码-拦截器
package com.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import com.interceptor.AuthorizationInterceptor;
@Configuration
public class InterceptorConfig extends WebMvcConfigurationSupport{
@Bean
public AuthorizationInterceptor getAuthorizationInterceptor() {
return new AuthorizationInterceptor();
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(getAuthorizationInterceptor()).addPathPatterns("/**").excludePathPatterns("/static/**");
super.addInterceptors(registry);
}
/**
* springboot 2.0配置WebMvcConfigurationSupport之后,会导致默认配置被覆盖,要访问静态资源需要重写addResourceHandlers方法
*/
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**")
.addResourceLocations("classpath:/resources/")
.addResourceLocations("classpath:/static/")
.addResourceLocations("classpath:/admin/")
.addResourceLocations("classpath:/front/")
.addResourceLocations("classpath:/public/");
super.addResourceHandlers(registry);
}
}
四、相关案例
🍅源码获取:大家点赞、收藏、关注、评论啦 、查看👇🏻获取联系方式👇🏻