tina tina - 1 month ago 29
Java Question

spring boot postgresql 9.5.3 dependency

Update:

As suggested in the answer below, use:

<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4.1211</version>
</dependency>





It is possible to use the postgresql version 9.5.3 in a maven spring boot project?
In that case, what I have to write in my pom.xml? Since I can't find code like this one:

<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4-1200-jdbc41</version>
</dependency>


for the version I want to use, and if I write 9.5.3 inside the version tag maven can't find the right jar for the project.

Answer

The version of the driver is not and doesn't need to be the same as the version of the server. If you use the newest driver as is recommended, it will work just fine with Postgres 9.5.3.

As a dependency the version should be 9.4-1211-jdbc42.

Comments