Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot Liquibase Gradle插件的url和referenceUrl似乎颠倒了_Spring Boot_Gradle_Liquibase_Liquibase Hibernate - Fatal编程技术网

Spring boot Liquibase Gradle插件的url和referenceUrl似乎颠倒了

Spring boot Liquibase Gradle插件的url和referenceUrl似乎颠倒了,spring-boot,gradle,liquibase,liquibase-hibernate,Spring Boot,Gradle,Liquibase,Liquibase Hibernate,我有一个非常简单的SpringBoot2.0.4项目。按照设置Liquibase Gradle插件的各种示例,我希望能够运行diffChangeLog目标来更新我的更改日志XML文件。配置如下所示: liquibase { activities { main { url 'jdbc:postgresql://localhost:5432/example_db' username

我有一个非常简单的SpringBoot2.0.4项目。按照设置Liquibase Gradle插件的各种示例,我希望能够运行
diffChangeLog
目标来更新我的更改日志XML文件。配置如下所示:

liquibase {
    activities {
        main {
            url                 'jdbc:postgresql://localhost:5432/example_db'
            username            'user'
            password            'password'
            driver              'org.postgresql.Driver'

            referenceUrl        'hibernate:spring:com.example?dialect=org.hibernate.dialect.PostgreSQL9Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy'
            referenceDriver     'liquibase.ext.hibernate.database.connection.HibernateDriver'

            classpath           'src/main'
            changeLogFile       "src/main/resources/db/changelog/master.xml"
        }
        runList = 'main'
    }
}
除了
databasechangelog
databasechangeloglock
表之外,数据库为空。当我运行
gradle diffChangeLog
时,更改日志XML文件从未更新。
gradle diff
的输出对所有内容都显示“无”。我的项目有一个实体,并用
@entity
注释


我做错了什么?

我猜您的模式是由hibernate(或类似的东西)生成的;因此@Entity在这里没有任何问题,diifChangeLog命令只查看您的数据库模式。您是否尝试过使用命令行?找到解决方案了吗?似乎liquibase gradle在构建文件夹中查看实体,而不是在源代码中。