springboot内置tomcat

springboot使用内置tomcat启动项目,配置了项目名myapp,访问地址localhost/myapp/x,现在有需求要访问localhost/aa.txt,如何实现

https://start.springboot.io/

img

之后写一个aa.txt接口就行了

从项目访问本地的静态资源,是这个意思吗?

aa.txt文件放在resources/static目录下,浏览器访问http://localhost/myapp/aa.txt