This Spring Boot application is connected to the Cloud PostgreSQL database using Render Cloud Application Hosting.
Note, that you can connect to the application any other database.
For this, you must define the connection attributes in the application.properties file. You can find it here - src/main/resources/application.properties.
Here is an example:
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/users_db
spring.datasource.username=user
spring.datasource.password=password
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.jpa.show-sql: true
- Start the application in your IDE as Java application.
- Go to any browser and enter the next URL:
Note that you also can change the server port in the application.properties file:
server.port=8081