I'm studying Spring with a bit of Hibernate, where I stopped in a situation I can not get through.
I've set up the hibernate code for creating tables in the database, but when I run the application it does not create.
My template class:
@Entity
@Table(name="cliente")
public class Cliente {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
private String nome;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
}
My properties:
server.port=${port:8080}
spring.datasource.url=jdbc:mysql://localhost:3306/clientesdb
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.username=root
spring.jpa.hibernate.ddl-auto = update
MySQL without a password.
Am I doing something wrong?