Olá, estou meio inferrujado mais…
Estou tentando criar um banco de dados via Hibernate, e nao esta aceitando passar informacao no SchemaExport
Bloco de Citação
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
public class GeraBancoUtil {
public static void main(String[] args) {
AnnotationConfiguration configuration = new AnnotationConfiguration();
configuration.configure();
new SchemaExport(configuration).create(false, true);
Bloco de Citação
Nao está aceitando passa o argumento configuration , e nao possui a funcao creat(boolean,boolean)
Exception in thread “main” java.lang.Error: Unresolved compilation problems:
The constructor SchemaExport(AnnotationConfiguration) is undefined
The method create(EnumSet, Metadata) in the type SchemaExport is not applicable for the arguments (boolean, boolean)
at br.com.mavenpoker.Util.GeraBancoUtil.main(GeraBancoUtil.java:17)
Maven
Bloco de Citação
< dependencies >
< dependency >
< groupId >org.apache.poi</ groupId >
< artifactId >poi-ooxml</ artifactId >
< version >4.1.2</ version >
</ dependency >
< dependency >
< groupId >org.projectlombok</ groupId >
< artifactId >lombok</ artifactId >
< version >1.18.4</ version >
< scope >provided</ scope >
</ dependency >
< dependency >
< groupId >mysql</ groupId >
< artifactId >mysql-connector-java</ artifactId >
< version >8.0.20</ version >
</ dependency >
< dependency >
< groupId >org.hibernate</ groupId >
< artifactId >hibernate-core</ artifactId >
< version >5.4.16.Final</ version >
</ dependency >
< dependency >
< groupId >org.hibernate</ groupId >
< artifactId >hibernate-entitymanager</ artifactId >
< version >5.4.16.Final</ version >
</ dependency >
< dependency >
< groupId >org.hibernate</ groupId >
< artifactId >hibernate-tools</ artifactId >
< version >5.4.16.Final</ version >
</ dependency >
< dependency >
< groupId >org.hibernate</ groupId >
< artifactId >hibernate-annotations</ artifactId >
< version >3.4.0.GA</ version >
</ dependency >
< dependency >
< groupId >log4j</ groupId >
< artifactId >log4j</ artifactId >
< version >1.2.17</ version >
</ dependency >
< dependency >
< groupId >org.slf4j</ groupId >
< artifactId >slf4j-api</ artifactId >
< version >1.7.30</ version >
</ dependency >
</ dependencies >
< build >
< plugins >
< plugin >
< groupId >org.apache.maven.plugins</ groupId >
< artifactId >maven-compiler-plugin</ artifactId >
< configuration >
< source >1.8</ source >
< target >1.8</ target >
</ configuration >
</ plugin >
</ plugins >
</ build >
</ project >
Bloco de Citação
Provavelmente alguma mudança nos metodos da nova versao… como seria hoje?