Maven tutorial: mvn spring-boot:run starts the springboot project (org.springframework.boot.spring-boot-maven-plugin plugin)

Run mvn spring-boot:runthe command to start the Spring Boot project. This command invokes the Maven plugin to compile and run the application. Before running this command, make sure you have a terminal open in the project root directory and that Maven is installed.

Here are the steps to run this command:

  1. Navigate to the project root directory in a terminal.
  2. Run the command mvn spring-boot:run.
  3. Maven will compile and build the project, then run the application.
  4. In the console, you will see logs output by the application.
  5. The application will start on the default port (usually 8080).

If you want to change the port number of your application, you can application.propertiesadd the following to the file:

server.port=your_port_number

Replace your_port_numberwith the port number you want to use.

Guess you like

Origin blog.csdn.net/a772304419/article/details/132103010