Estoy trababjando cpn Spring 5 y no me crea la tabla en la base de datos, ya que me genera el siguinete error:
schema.internal.SchemaCreatorImpl [0;39m [2m:[0;39m HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@7b27e8f4'
----------
application.yml
----------
spring:
datasource:
url: jdbc:mysql://localhost:3306/mydb
username: henry
password: Leandro2009
jpa:
show-sql: true
hibernate:
ddl-auto: update
naming:
physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
database-platform: org.hibernate.dialect.MySQL5Dialect
Entity: Course
package com.udemy.entity;
import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table;
@Entity @Table (name="course") public class Course {
@Id
@GeneratedValue
@Column(name="id")
private int id;
@Column(name="name")
private String name;
@Column(name="description")
private String description;
@Column(name="price")
private int price;
@Column(name="hours")
private int hours;
public Course() {
}
public Course(int id, String name, String description, int price, int hours) {
super();
this.id = id;
this.name = name;
this.description = description;
this.price = price;
this.hours = hours;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getPrice() {
return price;
}
public void setPrice(int price) {
this.price = price;
}
public int getHours() {
return hours;
}
public void setHours(int hours) {
this.hours = hours;
}
}
Repository with the application
https://github.com/hgarciaospina/Curso-Spring-4.git