After jenkins builds the project, the picture cannot be accessed using tomcat address

Problem description: After the
Jenkins build is completed, the access to the picture cannot be accessed
Description:
Insert picture description here
This is the address of the picture I stored: files The
request address of the picture:

https://ip:port/files/3ccf3429f1c142c99a839b61af3b3ded.jpg

The original Jenkins script:

  nohup java -jar /project/stla-server-1.0-SNAPSHOT.jar >/project/logs/stla-server.log 2>&1 &

After the construction is completed, access to the address of the picture on the browser, there will be a 404 error
Insert picture description here

solution:

Modify the script: first go to the directory where it is started, and then start it, it is ok

  cd /project/
  nohup java -jar stla-server-1.0-SNAPSHOT.jar >/project/logs/stla-server.log 2>&1 &
Published 104 original articles · Liked 18 · Visitors 8600

Guess you like

Origin blog.csdn.net/y368769/article/details/105324059