啊,在我发布此问题后,立即有一部分spring数据文档引起了我的注意:
73.5配置JPA属性 另外,在创建本地EntityManagerFactory时,spring.jpa.properties。*中的所有属性均作为常规JPA属性(带前缀)被传递。
因此,要回答我自己的问题:在javax.persistence属性的前面加上spring.jpa.properties:
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