Updated on 2024-09-04 GMT+08:00

Starting or Stopping Spring Boot

This action aims to start or stop the Spring Boot service in a specified path in an environment. The following table shows the configuration.

Table 1 Parameters

Parameter

Description

Action Name

Name of an added deployment action. Max 128 characters. Do not start or end with a space. Use letters, digits, spaces, and these special characters: -_,;:./().

Environment

Select a host cluster as the deployment object.

Operation

Start and Stop are available.

Absolute Path

Absolute path of the Spring Boot service.

System Variables

  • Optional.
  • Java running parameters. JVM variables are used. The commonly used parameter is -D.
  • The -XX and -X parameters are used to set the memory and GC parameters, respectively. The parameter settings may vary according to JVMs.
  • The -D and -X parameters are followed by Java. When starting the service, you can set the memory required for service running.
NOTE:

The common parameter format is -Dfile.encoding=UTF-8 -Xms256m -Xmx512m.

Command Parameters

  • Optional.
  • Spring Boot running parameters, that is, application parameters.
  • If you choose to start the service, you can use the -- parameter to set the listening port of the Spring Boot service.
NOTE:

The common parameter format is --server.port=9000 --spring.profiles.active=prod.

Waiting Time

Time for waiting for the service to start. If you choose to start the service, the system checks the process during the startup to determine whether the service is started successfully. You can adjust the time based on the actual time required for starting the service. If the time is improper, the detection fails.

Control Options

  • Enable this action.
  • Continue the task even if this action fails.
  • Execute this action with the sudo permission.

If you encounter any problem during deployment, see Solutions to Common Problems.