一般我们首页的路由,都是这样拦截
@Controller
@RequestMapping("/")
public class index {
@RequestMapping(method = {RequestMethod.GET})
public ModelAndView index() {
return new ModelAndView("view/index");
}
}
这样就可以拦截到例如这种路由:localhost/
但是最近发现,这样也可以拦截:localhost/.admin
注意,admin前面有个点。
这个问题在springboot2.0就没问题,会返回404。
我测试用的是springboot1.5.4。
为何要说这个?是因为现在很多漏洞扫描软件,会认为这属于存在系统隐藏文件,就是说你系统被入侵了。
坑得要命,不知道应该怎么修复。。。