This is the 10th day of my participation in Gwen Challenge
The business scenario
Idea is known as the best IDE in the world
This software has played a pivotal role in Spring Boot development, enabling us to implement one-click import project/one-click start project/one-click become lazy
Until one day, the front-end partner said NO to me and NO to the JAR package
To run Vue, we simply type YARN Run Serve on the command line
Can you make backend projects as easy to use as front-end partners?
So, this is a back-end, front-end tool article, so let’s get started
plan
After analyzing the requirements, the first reaction is to start with the Maven command
Install Maven
First, let’s go to the official website and download the zip package. Here is the address
Our purpose is to use, so download the bin package, interested partners can choose source
Download the Maven file and decompress it to the installation directory to install Maven
Configure Maven
Maven is not available after the installation, and we need to do two configurations
MAVEN_HOME = MAVEN_HOME = MAVEN_HOME = MAVEN_HOME = MAVEN_HOME = MAVEN_HOME = MAVEN_HOME = MAVEN_HOME = MAVEN_HOME
Second, we need to modify %MAVEN_HOME%\conf\setting. XML to comment out the local mirror tag:
To see maven’s version number, open the command line and type MVN –version
Is it similar to nodeJS installation?
Example Add the CLASspath system environment variable
In IDEA, we have JDK selection, and in this process, the CLASspath is configured for us by the IDE
With Maven, however, we have no corresponding behavior, so we need to add classpath to the system variable
Jar and tools.jar, which are located in the lib folder of the JKD directory:
The method of adding environment variables is the same as before
Project start
At this point, all we need to do is go to the root directory of our Spring Boot project and run the following command:
mvn spring-boot:run -Pdevelopment
Copy the code
-p is the profile parameter, which is used to switch configuration files in different environments