First of all, the way to start the Spring Boot framework project on the local idea (normal spring project running can be self-Baidu): NOTE: The default development of the Web project full performance Mode 1.If the spring application is not configured at the time of deploymentYou can add spring application manually and then right-click the Run main function in the application main function file
Mode 2. First of all, Baidu download maven (MVN) to local, the default is to generate a. m2 file (Maven local library), and then configure the path environment, then use the command line CD in the local host CMD to the project directory
MVN Spring-boot:run
Mode 3. Ready to work the same way 2,CD to the project directory mvn install #compiling the project CD Target
Java-jar Project Name -0.0.1-snapshot.jar
Mode 4. Configuring the development environment or production environment in the Application.properties fileready to work the same way 3 run with the following command
Java-jar Project name -0.0.1-snapshot.jar--spring.profiles.active=prod
"Start the topic of this article" for example, there is a multi-module project: Common, Org, modules/admin, Modules/gateway, modules/interface in the local use of Apache deployment run, you need to modules/ The admin, Modules/gateway, Modules/interface exploded packages are loaded in the same vein, and when deployed to a server, these three modules are packaged into a war package to package the project:1. Use the shortcut key alt+f12 in idea to open the terminal 2. Because in these three modules, will rely on other packages, such as common,org and other dependent modules,Therefore, the project needs to be packaged using the mvn Clean packag command, and the dependent packages are automatically made into jar packages and imported into the three modulesso open the terminal and enter the following command in turn:MVN Clean Compile #清除之前dtarget编译文件并重新编译
MVN Clean Package #对项目进行打包 (dependent on Jarweb Project bit War pack)
MVN clean Install #安装项目可运行
upload the three modules of the war package to the server:1. Use PSCP to upload the war package to the server's Apache/webapps, noting that the environment version at the local development is consistent with the server (preferably)
[Daily pits] Deploy multi-module project to server using the spring framework developed by idea