简介
springboot接口url匹配后缀,例如url访问/test,匹配后缀之后,访问/test.*同样可以;
项目实践
package com.springboot.sixmonth.common.filter;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/**
* 过滤器
* @author hqc
* @Date 2019年3月20日
*
*/
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
/**
* -设置url后缀模式匹配规则
* -该设置匹配所有的后缀,使用.do或.action都可以
*/
@Override
p