Skip to content

Latest commit

 

History

History
 
 

spring-boot

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

SPRING BOOT

Extension to the Empower Plant UI/UX. This project was originally bootstrapped with Create React App; this Java Spring Boot backend is available with the query param &backend=springboot, [e.g.] (http://localhost:5000/?se=simon&backend=springboot).

Setup

This uses java version 8 and SpringBoot version 2.5.4 spring-boot-starter-parent?

  1. Set env-config/*.env with
REACT_APP_SPRINGBOOT_BACKEND=<value>
  1. Set other spring-boot/src/main/resources/application.properties property values

  2. Follow steps as described in application.properties for Local DEV deployment XOR Cloud GCP deployment

  3. Put your DSN key in application.properties

Run

Verify that the DEV section is not commented out in application.properties and values are set. The GCP section should be commented out.

spring.datasource.url=jdbc:postgresql://<server>:<port>/<database name>
server.port=8090
spring.cloud.gcp.sql.enabled=false

Run ./run.sh

Cloud GCP Deployment

Verify that the GCP section is not commented AND DEV section is commented (i.e. application.properties should have no values for spring.datasource.url nor server.port).

spring.cloud.gcp.sql.enabled=true

and to deploy

mvn clean package appengine:deploy

If you get invalid authentication credentials, try running first before deploying:

gcloud auth login

Configuration Files

All configurations are in src/main/resources/application.properties and src/main/appengine/app.yaml.