How to realize the function of generating sql file similar to SchemaExport in SpringBoot + Hibernate

at present, you want to realize the function of generating sql files from annotated entity. Baidu knows that Hibernate has a SchemaExport that can do it, but it needs Hibernate"s xml configuration file by default.
I don"t know if there is any similar way to bypass it, or other third-party plug-ins can generate corresponding SQL files by scanning Hibernate annotations on entity.

that is, there is any way to get the spring.jpa.hibernate.ddl-auto file separately without setting the SQL configuration.

or does Hibernate have a way to generate sql files through annotations such as @ Entity on entity classes.

find a jpa2.1 solution

spring.jpa.properties.javax.persistence.schema-generation.create-source=metadata
spring.jpa.properties.javax.persistence.schema-generation.scripts.action=create
spring.jpa.properties.javax.persistence.schema-generation.scripts.create-target=create.sql

I wonder if 1.5 is relevant

Jan.14,2022

emmm, has found the answer, which can be solved with the one above. The jpa for SpringBoot1.5 integration is 2.1.

found that there is still a problem. The generated sql has no delimiter;

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b33464-2be99.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b33464-2be99.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?