Predefined Variables
When you deploy a Spring Boot application using the Oracle Backend for Microservices and AI CLI or Visual Code extension, a number of predefined environment variables will be injected into the pod definition. You may reference any of these variables in your application.
The predefined variables are as follows:
- app.container.port, for example- 8080.
 This sets the listen port for the pod and service. The Spring Boot application will listen on this port. The default is- 8080. This can be set using the- --portparameter on the- deploycommand in the CLI.
- spring.profiles.active, for example- default.
 This sets the Spring profiles that will be active in the application. The default value is- default. This can be changed set the- --service-profileparameter on the- deploycommand in the CLI.
- spring.config.label, for example- 0.0.1.
 This is a label that can be used with Spring Config to look up externalized configuration from Spring Config Server, along with the application name and the profile.
- eureka.instance.preferIpAddress, for example- true.
 This tells the Eureka discovery client to use the- preferIpAddresssetting. This is required in Kubernetes so that service discover will work correctly.
- eureka.instance.hostname, for example- customer32.application.
 This sets the hostname that Eureka will use for this application.
- MP_LRA_COORDINATOR_URL, for example- http://otmm-tcs.otmm.svc.cluster.local:9000/api/v1/lra-coordinator.
 This is the URL for the transaction manager which is required when using Eclipse Microprofile Long Running Actions in your application.
- MP_LRA_PARTICIPANT_URL, for example- http://customer32.application.svc.cluster.local:8080.
 This is the participant URL which is required when using Eclipse Microprofile Long Running Actions in your application.
- eureka.client.register-with-eureka, for example- true.
 This tells the Eureka discovery client to register with the Eureka server.
- eureka.client.fetch-registry, for example- true.
 This tells the Eureka discovery client to make a local copy of the registry by fetching it from the Eureka server.
- eureka.client.service-url.defaultZone, for example- http://eureka.eureka:8761/eureka.
 This is the default zone for the Eureka discovery client.
- OTEL_EXPORTER_OTLP_ENDPOINT, for example- http://obaas-signoz-otel-collector.observability:4318.
 This is the URL of the OpenTelemetry (OTLP protocol) collector which can be used by your application to send observability data to the the SigNoz platform.
- config.server.url, for example- http://config-server.config-server.svc.cluster.local:8080.
 This is the URL of the Spring Config Server provided by the platform.
- liquibase.datasource.username, for example set to the key- db.usernamein secret- admin-liquibasedb-secrets.
 This sets the (admin) user that should be used to run Liquibase, if used in your service.
- liquibase.datasource.password, for example set to the key- db.passwordin secret- admin-liquibasedb-secrets.
 This sets the (admin) user’s password that should be used to run Liquibase, if used in your service.
- spring.datasource.username, for example set to the key- db.usernamein secret- customer32-db-secrets.
 This sets the (regular) user for your application to use to connect to the database (if you use JPA or JDBC in your application).
- spring.datasource.password:, for example set to the key- db.passwordin secret- customer32-db-secrets.
 This sets the (regular) user’s password for your application to use to connect to the database (if you use JPA or JDBC in your application).
- DB_SERVICE, for example set to the key- db.servicein secret- customer32-db-secrets.
 This sets the database service name (the TNS name) for your application to use to connect to the database (if you use JPA or JDBC in your application).
- spring.datasource.url, for example- jdbc:oracle:thin:@$(DB_SERVICE)?TNS_ADMIN=/oracle/tnsadmin.
 This sets the data source URL for your application to use to connect to the database (if you use JPA or JDBC in your application).
- CONNECT_STRING, for example- jdbc:oracle:thin:@$(DB_SERVICE)?TNS_ADMIN=/oracle/tnsadmin.
 This sets the data source URL for your application to use to connect to the database (if you use JPA or JDBC in your application).