spring-boot-api-project-seed icon indicating copy to clipboard operation
spring-boot-api-project-seed copied to clipboard

hello 使用freemarker 一直重定向

Open Jesse-so-cool opened this issue 6 years ago • 3 comments

如访问 http://localhost:8080/hello 页面错误为: {"code":404,"message":"接口 [/index] 不存在"}

redirect

Jesse-so-cool avatar Jun 19 '18 03:06 Jesse-so-cool

controller

Jesse-so-cool avatar Jun 19 '18 03:06 Jesse-so-cool

配置文件里面去掉 spring.resources.add-mappings=false 这行是 选择不开启默认的资源处理,不开启的话是找不到你的静态资源的

wang-y avatar Jun 20 '18 07:06 wang-y

嗯,楼上说的没错,因为考虑到是个API项目所以设置为false

lihengming avatar Jun 25 '18 08:06 lihengming