Vue webpack deploys to tomcat and cannot find the path

Specific problem description:

Use vue to write pages, and webpack to edit and package. Springboot is used in the background. The packaged vue single-page file is placed under classes/public.

 

Problem: When visiting the vue page, an error is reported that the file cannot be read. And the files that cannot be found are located under public.

Doubt: There are files in the public directory, why can't they be found?

 

Process:

1. Baidu's various searches for vue+webpack 404 cannot find the path, etc. found no solution

 

Result: I suddenly remembered that the reading of the path in java will be transcoded if there are spaces in the path. So the file cannot be read.

 

Path space. Path space Path space Important thing to say three times.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326323547&siteId=291194637