I have a problem when connect Spring Boot with PostgreSQL. I can't seem to make it work. If there's anything missing I can give it more to you but for now this is enough information
the full error:
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.2.RELEASE:run (default-cli) on project resorts-restful-project: An exception occurred while running. null: InvocationTargetException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
heres my configuration:
application.properties:
spring.datasource.url= jdbc:postgresql://localhost:5433/qwerty
spring.datasource.username=postgres spring.datasource.password=postgres@qwerty
spring.jpa.hibernate.ddl-auto=create-drop
my model:
package com.fvthree.domain;
import javax.persistence.*;
import java.io.Serializable;
@Entity
public class Resort implements Serializable {
@Id
@GeneratedValue
@Column(name="resorts_id")
private Long id;
@Column(name="name")
private String name;
@Column(name="location")
private String location;
@Column(name="contact_id")
private Long contactId;
public Resort() {
}
public Resort(Long id, String name, String location, Long contactId) {
this.id = id;
this.name = name;
this.location = location;
this.contactId = contactId;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public Long getContactId() {
return contactId;
}
public void setContactId(Long contactId) {
this.contactId = contactId;
}
}