current position:Home>The back-end interface developed by springboot in idea and the Vue front-end developed by vscode. How to integrate Vue code into springboot?

The back-end interface developed by springboot in idea and the Vue front-end developed by vscode. How to integrate Vue code into springboot?

2022-04-29 18:52:25segmentfault

Want to merge into one , Then reach a war Package release



Other answers 1:

vue The source code is put in the back-end project , Fight war When the package , By configuring pom, Use maven The plug-in that executes the command is maven In the build lifecycle , perform "npm install && npm run build:prod" Similar commands compile the final static resources , then cp To spring boot Of resource/static Next , That's all right. , All operations are performed by maven To take over .
If gradle I'm sure it can be , Similar process , I only use maven That's how I handled it .


Other answers 2:

Java Don't understand, . But logically, it should be vue project build After that dist Put the folder in java In the corresponding static service folder .

copyright notice
author[segmentfault],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/115/202204251306426615.html

Random recommended