How do you add PostgreSQL Driver as a dependency in Maven?

前端 未结 5 1988
深忆病人
深忆病人 2020-12-13 05:29

I\'m trying to develop a Java application with Maven while using Hibernate with a PostgreSQL database for persistence. I don\'t understand how I\'m supposed to connect the P

5条回答
  •  轮回少年
    2020-12-13 05:59

    PostgreSQL drivers jars are included in Central Repository of Maven:

    • List of included versions of PostgreSQL drivers.

    For PostgreSQL up to 9.1, use:

    
        postgresql
        postgresql
        VERSION
    
    

    or for 9.2+

    
        org.postgresql
        postgresql
        VERSION
    
    

    (Thanks to @Caspar for the correction)

提交回复
热议问题