简体   繁体   中英

Java Spring Boot: project saves images in the wrong path and not display images when opening with IDE Intellji

I have a project, my project is multiple module project like in the picture below, I used SpringToolSuite(STS) to code this project, recently I switched to Intellji so I opened this project with the Intellji IDE

多模块项目

When I open this project with STS, it shows the image in the browser normally, but when I open this project with Intellji IDE, it doesn't load the image in the browser.

I have a code that saves images, when I use STS , the images are saved to a folder with the path: "ShopmeProject\\ShopmeWebParent\\ShopmeBackEnd\\user-photo"

But when I use Intellji IDE , my image is saved to the path: "ShopmeProject\\user-photo"

So I need someone who can help me to configure my project to run properly on Intellji IDE

I'm following this step and it works perfect

Step 1:

在此处输入图片说明

Step 2: set Working directory as $MODULE_WORKING_DIR$

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM