I am studying while creating an application that uses Spring Boot and PostgreSQL DB.
The other day I created a Spring app that uses PosgreSQL testdb with the following settings
spring.jpa.database=POSTGRESQL spring.datasource.driver-class-name = org.postgresql.Driver spring.datasource.url = jdbc: postgresql: // localhost: 5432/testdb spring.datasource.username = XXXX spring.datasource.password = XXXX
Currently, I have packaged this app and am trying to start it in an environment different from the development environment, but the DB specification part is not working after starting, and it seems that the external connection setting of PostgeSQL is not working well.
The goal is to be able to connect to testdb in the development environment in an external environment.What I tried
Currently[Settings for connecting to PostgreSQL from other terminals]I set PostgreSQL as shown in the above, and in the test using A5M2, the connection was successful.
Therefore, I suspect that the cause is probably in the contents of aplication.properties, but I have not been able to resolve it.
If i have any idea about the missing settings or causes, please do so.Environment, tools, etc.
OS: windows10 (both development and external)
Development tools: STS
Language: Java Spring
Executable: jar (confirmed to start the application itself)
Test tool: A5M2
Answer # 1
This usually goes to see your local server.
I think it is necessary to specify the address (IP or name) of the target server. Did you set the server IP etc. on A5M2 and test the connection?
- java - authentication/authorization processing using spring security is not possible
- java - when i launch the jar file created by spring boot+gradle+mysql, it becomes failed to determine a suitable driver class
- java - file upload using spring security
- displaying minimums using java methods and arrays
- java - updating variables using charat ();
- java - i want to connect postgresql to eclipse
- java - spring framework message resource is not displayed correctly
- postgresql - about db operation using flask and sqlalchemy
- [java] i want to prohibit input of only blanks using regular expressions
- java - cannot compile using package (mac)
- java - spring boot annotation cannot be used
- java - i would like to know how to implement table join in spring + mybatis
- java - thymeleaf (+ spring) i want to make variable assignment processing asynchronous
- java - spring framework @reqestmapping
- how to write information to db using spring data jdbc
- java - i want to extract all the data using cursor
- java - spring boot search function
- [beginner] i want to display postgresql data on html using ruby with filtering function
- java - spring boot search function sql is not reflected after submitting with characters