当前位置:网站首页>After the microservice project is deployed, static resources and files uploaded to upload cannot be accessed. Solution

After the microservice project is deployed, static resources and files uploaded to upload cannot be accessed. Solution

2022-07-05 14:08:00 nightwind2017

terms of settlement

  1. When we go directly to the back end through the front end , You can set up listeners , Direct access to upload Documents in .

  2. But when we deploy microservices , The backend is divided into client backend and server backend , The files we uploaded may be uploaded to the microservice, which is used by the server backend upload Folder , under these circumstances , We need to get through ip Address + Port number + Resource folder Mode of access

  3. give an example , We uploaded photos to the wechat service upload In the folder , The front end should be accessed in the following format

<img src="http:xxx.xx.xx.xxx:xxxx/upload/xxxxx.jpg">
原网站

版权声明
本文为[nightwind2017]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207051401385478.html