Code Monkey home page Code Monkey logo

git-tutorial's People

Contributors

xichuanwushao avatar

Watchers

 avatar

git-tutorial's Issues

idea下springboot 项目在static目录下添加文件不生效

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

转载于:https://my.oschina.net/wotrd/blog/3075538

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.