xichuanwushao / git-tutorial Goto Github PK
View Code? Open in Web Editor NEWspringboot框架学习测试demo
springboot框架学习测试demo
idea下springboot 项目在static目录下添加文件不生效
转载chenman5281 最后发布于2019-07-17 23:30:00 阅读数 128 收藏
展开
AutoSAR入门到精通系列讲解
将从2019年开始更新关于AutoSAR的知识,从入门到精通,博主xyfx和大家一起进步
雪云飞星
¥19.00
去订阅
idea下springboot 项目在static目录下添加文件不生效
问题描述 是这样子的,我的项目目录结构如下:
s_w_3
我在static目录下,创建了index.html和aaaa.jpg这两个文件。然后,启动服务访问 http://loclahost:8080/ 可以正常访问
s_w_2
现在,有我创建test目录,添加这两个文件。目录如下: s_w_1
现在,我重启服务,访问 http://localhost:8080/test/aaaa.jpg 出现404 s_w_4
打开target目录如下
s_w_5
可以看到静态static下没有test目录。所以,404很正常。
解决办法,在pom文件添加build如下:
s_w_6 删除,再添加文件,重启服务。页面可以访问了。
有问题,请留言!
个人博客地址: https://blog.ailijie.top/archives/ideaspringboot-static
类名要大写
没有初始化成员变量导致
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.