I am developing a spring-boot web project using mvc. I build a jar package locally and it works. However, I got all JS resources 404 error when the jar is deployed remotely.
I unzip the jar file, and the main directory under BOOT-INF/classes is:
[xx@l-monitor-server1.mgt.pre.aws.dm classes]$ tree static/
static/
├── css
│ ├── baseCore.css ...
│ ├── bootstrap.css
│ └── sb-admin-2.min.css
├── fonts
│ ├── FontAwesome.otf ..
│ ├── fontawesome-webfont.eot
│ ├── fontawesome-webfont.svg
│ └── glyphicons-halflings-regular.woff2
├── js
│ ├── baseCore.css
│ ├── bootstrap.js
│ ├── bootstrap.min.js
│ ├── dataTables.bootstrap.min.js
...
└── jstool
├── baseCore.css
├── bootstrap.js
├── bootstrap.min.js
├── dataTables.bootstrap.min.js
└── sb-admin-2.min.js
- It is strange that other resources under
cssandfontsare OK.- I copied the
jsdirectory tojstool, and the resources underjstoolare also ok. 3, all resources underjsfails with 404.
- I copied the
I have not found answer from spring-boot static content .
Is there any trick on the name js under static directory?
Aucun commentaire:
Enregistrer un commentaire