- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我正在尝试使用 liquibase 配置简单的 maven 项目。我有很多关于 liquibase-maven-plugin 和 liquibase-hibernate4 版本的问题,它们不会产生大的堆栈跟踪,但最后我几乎让它工作了。但是当我执行 mvn liquibase:diff 时,它以消息 liquibase: No changes found, nothing to do
结束。
这是我的 pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>pl.mlewando.ff</groupId>
<artifactId>liquibase_test</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.7.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.6.Final</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.14.8</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.32</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<changeLogFile>src/main/resources/db/db.changelog.xml</changeLogFile>
<diffChangeLogFile>src/main/resources/db/generated-db.changelog.xml</diffChangeLogFile>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://localhost:3306/liquibase_test?characterEncoding=utf8</url>
<username>root</username>
<password>root</password>
<referenceUrl>hibernate:spring:pl.mlewando.ff.model?dialect=org.hibernate.dialect.MySQL5InnoDBDialect</referenceUrl>
<verbose>true</verbose>
<logging>debug</logging>
</configuration>
<dependencies>
<dependency>
<groupId>org.liquibase.ext</groupId>
<artifactId>liquibase-hibernate4</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.32</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.7.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.6.Final</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
并从 mvn liquibase:diff
:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building liquibase_test_backend 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- liquibase-maven-plugin:3.2.1:diff (default-cli) @ liquibase_test_backend ---
[INFO] ------------------------------------------------------------------------
[INFO] Loading artfacts into URLClassLoader
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/data/spring-data-jpa/1.7.0.RELEASE/spring-data-jpa-1.7.0.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/data/spring-data-commons/1.9.0.RELEASE/spring-data-commons-1.9.0.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-orm/4.0.7.RELEASE/spring-orm-4.0.7.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-jdbc/4.0.7.RELEASE/spring-jdbc-4.0.7.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-context/4.1.1.RELEASE/spring-context-4.1.1.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-expression/4.1.1.RELEASE/spring-expression-4.1.1.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-aop/4.0.7.RELEASE/spring-aop-4.0.7.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-tx/4.0.7.RELEASE/spring-tx-4.0.7.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-beans/4.0.7.RELEASE/spring-beans-4.0.7.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-core/4.0.7.RELEASE/spring-core-4.0.7.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/aspectj/aspectjrt/1.8.2/aspectjrt-1.8.2.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.7/jcl-over-slf4j-1.7.7.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/hibernate/hibernate-entitymanager/4.3.6.Final/hibernate-entitymanager-4.3.6.Final.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/jboss/logging/jboss-logging/3.1.3.GA/jboss-logging-3.1.3.GA.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/jboss/logging/jboss-logging-annotations/1.2.0.Beta1/jboss-logging-annotations-1.2.0.Beta1.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/hibernate/hibernate-core/4.3.6.Final/hibernate-core-4.3.6.Final.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/jboss/jandex/1.1.0.Final/jandex-1.1.0.Final.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/hibernate/common/hibernate-commons-annotations/4.0.5.Final/hibernate-commons-annotations-4.0.5.Final.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/jboss/spec/javax/transaction/jboss-transaction-api_1.2_spec/1.0.0.Final/jboss-transaction-api_1.2_spec-1.0.0.Final.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/projectlombok/lombok/1.14.8/lombok-1.14.8.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/mysql/mysql-connector-java/5.1.32/mysql-connector-java-5.1.32.jar
[INFO] artifact: file:/C:/Users/mlewandowski/IdeaProjects/forfun/liquibase_test/backend/target/classes/
[INFO] artifact: file:/C:/Users/mlewandowski/IdeaProjects/forfun/liquibase_test/backend/target/test-classes
[INFO] ------------------------------------------------------------------------
[INFO] Settings
----------------------------
[INFO] driver: com.mysql.jdbc.Driver
[INFO] url: jdbc:mysql://localhost:3306/liquibase_test?characterEncoding=utf8
[INFO] username: root
[INFO] password: *****
[INFO] use empty password: false
[INFO] properties file: null
[INFO] properties file will override? false
[INFO] prompt on non-local database? true
[INFO] clear checksums? false
[INFO] changeLogFile: src/main/resources/db/db.changelog.xml
[INFO] context(s): null
[INFO] referenceDriver: null
[INFO] referenceUrl: hibernate:spring:pl.mlewando.ff.model?dialect=org.hibernate.dialect.MySQL5InnoDBDialect
[INFO] referenceUsername: null
[INFO] referencePassword: null
[INFO] referenceDefaultSchema: null
[INFO] diffChangeLogFile: src/main/resources/db/generated-db.changelog.xml
[INFO] ------------------------------------------------------------------------
DEBUG 25.11.14 12:07: liquibase: Connected to root@localhost@jdbc:mysql://localhost:3306/liquibase_test?characterEncoding=utf8
DEBUG 25.11.14 12:07: liquibase: Setting auto commit to false from true
[INFO] Executing on Database: jdbc:mysql://localhost:3306/liquibase_test?characterEncoding=utf8
[INFO] Loading artfacts into URLClassLoader
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/data/spring-data-jpa/1.7.0.RELEASE/spring-data-jpa-1.7.0.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/data/spring-data-commons/1.9.0.RELEASE/spring-data-commons-1.9.0.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-orm/4.0.7.RELEASE/spring-orm-4.0.7.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-jdbc/4.0.7.RELEASE/spring-jdbc-4.0.7.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-context/4.1.1.RELEASE/spring-context-4.1.1.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-expression/4.1.1.RELEASE/spring-expression-4.1.1.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-aop/4.0.7.RELEASE/spring-aop-4.0.7.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-tx/4.0.7.RELEASE/spring-tx-4.0.7.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-beans/4.0.7.RELEASE/spring-beans-4.0.7.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/springframework/spring-core/4.0.7.RELEASE/spring-core-4.0.7.RELEASE.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/aspectj/aspectjrt/1.8.2/aspectjrt-1.8.2.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.7/jcl-over-slf4j-1.7.7.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/hibernate/hibernate-entitymanager/4.3.6.Final/hibernate-entitymanager-4.3.6.Final.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/jboss/logging/jboss-logging/3.1.3.GA/jboss-logging-3.1.3.GA.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/jboss/logging/jboss-logging-annotations/1.2.0.Beta1/jboss-logging-annotations-1.2.0.Beta1.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/hibernate/hibernate-core/4.3.6.Final/hibernate-core-4.3.6.Final.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/jboss/jandex/1.1.0.Final/jandex-1.1.0.Final.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/hibernate/common/hibernate-commons-annotations/4.0.5.Final/hibernate-commons-annotations-4.0.5.Final.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/jboss/spec/javax/transaction/jboss-transaction-api_1.2_spec/1.0.0.Final/jboss-transaction-api_1.2_spec-1.0.0.Final.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/org/projectlombok/lombok/1.14.8/lombok-1.14.8.jar
[INFO] artifact: file:/C:/Users/mlewandowski/.m2/repository/mysql/mysql-connector-java/5.1.32/mysql-connector-java-5.1.32.jar
[INFO] artifact: file:/C:/Users/mlewandowski/IdeaProjects/forfun/liquibase_test/backend/target/classes/
[INFO] artifact: file:/C:/Users/mlewandowski/IdeaProjects/forfun/liquibase_test/backend/target/test-classes
[INFO] ------------------------------------------------------------------------
DEBUG 25.11.14 12:07: liquibase: Connected to null@hibernate:spring:pl.mlewando.ff.model?dialect=org.hibernate.dialect.MySQL5InnoDBDialect
DEBUG 25.11.14 12:07: liquibase: Not adjusting the auto commit mode; it is already false
INFO 25.11.14 12:07: liquibase-hibernate: Reading hibernate configuration hibernate:spring:pl.mlewando.ff.model?dialect=org.hibernate.dialect.MySQL5InnoDBDialect
INFO 25.11.14 12:07: liquibase-hibernate: Found package pl.mlewando.ff.model
INFO 25.11.14 12:07: liquibase-hibernate: Found dialect org.hibernate.dialect.MySQL5InnoDBDialect
INFO 25.11.14 12:07: liquibase-hibernate: Found hibernate.enhanced_idfalse
lis 25, 2014 12:07:37 PM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation
INFO: HHH000204: Processing PersistenceUnitInfo [
name: default
...]
lis 25, 2014 12:07:37 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.3.1.Final}
lis 25, 2014 12:07:37 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
lis 25, 2014 12:07:37 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
lis 25, 2014 12:07:37 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
lis 25, 2014 12:07:37 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
INFO 25.11.14 12:07: liquibase-hibernate: Using dialect org.hibernate.dialect.MySQL5InnoDBDialect
[INFO] Performing Diff on database root@localhost @ jdbc:mysql://localhost:3306/liquibase_test?characterEncoding=utf8 (Default Schema: liquibase_test)
DEBUG 25.11.14 12:07: liquibase: Computed checksum for 1416913657501 as 5fde170700e5d1ee87d42598486086ef
INFO 25.11.14 12:07: liquibase-hibernate: Found table User
INFO 25.11.14 12:07: liquibase-hibernate: Found table User
INFO 25.11.14 12:07: liquibase-hibernate: Found column id bigint
INFO 25.11.14 12:07: liquibase-hibernate: Found column name varchar(255)
INFO 25.11.14 12:07: liquibase-hibernate: Found primary key UserPK
INFO 25.11.14 12:07: liquibase: src\main\resources\db\generated-db.changelog.xml exists, appending
DEBUG 25.11.14 12:07: liquibase: MissingObjectChangeGenerator type order: liquibase.structure.core.Catalog liquibase.structure.core.Schema liquibase.structure.core.Sequence liquibase.structure.core.StoredProcedure liquibase.structure.core.Table liquibase.structure.core.Column liquibase.structure.core.PrimaryKey liquibase.structure.core.UniqueConstraint liquibase.structure.core.ForeignKey liquibase.structure.core.Index liquibase.structure.core.View
DEBUG 25.11.14 12:07: liquibase: UnexpectedObjectChangeGenerator type order: liquibase.structure.core.Catalog liquibase.structure.core.ForeignKey liquibase.structure.core.Schema liquibase.structure.core.StoredProcedure liquibase.structure.core.UniqueConstraint liquibase.structure.core.View liquibase.structure.core.Table liquibase.structure.core.PrimaryKey liquibase.structure.core.Column liquibase.structure.core.Index liquibase.structure.core.Sequence
DEBUG 25.11.14 12:07: liquibase: ChangedObjectChangeGenerator type order: liquibase.structure.core.Catalog liquibase.structure.core.ForeignKey liquibase.structure.core.Schema liquibase.structure.core.Sequence liquibase.structure.core.StoredProcedure liquibase.structure.core.Table liquibase.structure.core.Column liquibase.structure.core.PrimaryKey liquibase.structure.core.Index liquibase.structure.core.UniqueConstraint liquibase.structure.core.View
INFO 25.11.14 12:07: liquibase: No changes found, nothing to do
[INFO] Differences written to Change Log File, src/main/resources/db/generated-db.changelog.xml
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.129 s
[INFO] Finished at: 2014-11-25T12:07:37+01:00
[INFO] Final Memory: 20M/308M
[INFO] ------------------------------------------------------------------------
在 src/main/java/pl/mlewando/ff/model
我有一个简单的类:
package pl.mlewando.ff.model;
import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
@Data
class User {
@Id
private long id;
private String name;
}
和src/main/resources/META-INF/
中的persistence.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="persistenceUnit" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
</properties>
</persistence-unit>
</persistence>
Database liquibase_test
是空的,当我执行 mvn liquibase:update
与空 db.changelog.xml
它创建表 databasechangelog
和 databasechangeloglock
,但之后当我运行 mvn liquibase:diff
时仍然看不到用户表。
我做错了什么?谢谢!
编辑:
当我尝试使用此命令从命令行区分时:
liquibase
--driver=com.mysql.jdbc.Driver
--url=jdbc:mysql://localhost:3306/liquibase_test_ref
--username=root
--password=root
diffChangeLog
--referenceUrl="hibernate:spring:pl.mlewando.ff.model?dialect=org.hibernate.dialect.MySQL5InnoDBDialect"
一切正常,我最终得到了这个变更日志:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<changeSet author="mlewandowski (generated)" id="1416923630350-1">
<createTable tableName="User">
<column name="id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="name" type="VARCHAR(255)"/>
</createTable>
</changeSet>
<changeSet author="mlewandowski (generated)" id="1416923630350-2">
<addPrimaryKey columnNames="id" constraintName="UserPK" tableName="User"/>
</changeSet>
</databaseChangeLog>
我有 3.2.1 版的 liquibase(与 pom.xml 中的相同)和类路径上的这些 jar:
antlr-2.7.7.jar
aopalliance-1.0.jar
aspectjrt-1.8.2.jar
dom4j-1.6.1.jar
hibernate-commons-annotations-4.0.5.Final.jar
hibernate-core-4.3.1.Final.jar
hibernate-entitymanager-4.3.6.Final.jar
hibernate-envers-4.3.1.Final.jar
hibernate-jpa-2.1-api-1.0.0.Final.jar
jandex-1.1.0.Final.jar
javassist-3.18.1-GA.jar
jboss-logging-3.1.3.GA.jar
jboss-logging-annotations-1.2.0.Beta1.jar
jboss-transaction-api_1.2_spec-1.0.0.Final.jar
jcl-over-slf4j-1.7.7.jar
liquibase_test_backend-1.0.jar
liquibase-hibernate4-3.4.jar
mysql-connector-java-5.1.33.jar
slf4j-api-1.7.7.jar
snakeyaml-1.13.jar
spring-aop-4.0.7.RELEASE.jar
spring-beans-4.0.7.RELEASE.jar
spring-context-4.1.1.RELEASE.jar
spring-core-4.0.7.RELEASE.jar
spring-data-commons-1.9.0.RELEASE.jar
spring-data-jpa-1.7.0.RELEASE.jar
spring-expression-4.1.1.RELEASE.jar
spring-jdbc-4.0.7.RELEASE.jar
spring-orm-4.0.7.RELEASE.jar
spring-tx-4.0.7.RELEASE.jar
xml-apis-1.0.b2.jar
但我真的很想通过 maven 来做。所以,再说一遍:我做错了什么?
最佳答案
我不确定这是否相关,但前段时间我在 liquibase-hibernate-plugin
上发现了一个类似的错误。我使用的是带有 hiberante 4 的 Spring 本地 session 工厂,但它也没有发现变化。
调试后发现 liquibase-hibernate-plugin
使用 import org.springframework.orm.hibernate3.LocalSessionFactoryBean;
into HibernateSpringDatabase.java
因此它无法读取我的配置。
我更改了它并生成了一个拉取请求,现在它对我来说可以正常工作了。
如果您想尝试一下,可以使用我更改的 liquibase-hibernate-plugin 使用以下 maven 依赖项:
<dependency>
<groupId>com.github.malaguna</groupId>
<artifactId>liquibase-hibernate</artifactId>
<version>liquibase-hibernate4-3.6.1</version>
</dependency>
但是首先你必须将 JitPack repo 添加到 maven pom.xml:
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
希望对你有帮助!
关于java - Liquibase 看不到实体的变化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27125521/
我一直在尝试处理一个类项目,在该项目中我必须设置一个面向 GUI 的转换程序,并且我试图将数据从我的类的方法传递到 ActionListener,但监听器是告诉我文本字段不存在。它位于同一个包和类中,
我在服务器上有两个版本的 PHP(Centos 6.8) - 5.6 和 7.1 我的 Nginx 使用 php7.1,它不是默认的 PHP 解释器。 经过一番与 yum 的斗争后,我安装了 php7
我正在尝试为 BEAGLE 安装 OpenCL .首先,我下载了 intel_sdk_for_opencl_applications_2020.3.494.tar.gz 来自 here .然后我解压并
我想知道为什么我在 controlPanel 中看不到 topPanel 这是我的代码: import java.awt.BorderLayout; import java.awt.Color; im
在我的 urls.py 中,我有以下内容: urlpatterns = patterns('', # Examples: #url(r'^$', 'welcome_page.home'
非常感谢大家的帮助! 在 GetProductByID 下,我收到一条错误消息“int does not contain a definition for FirstOrDefault”。 using
1) 我已经通过 my computuer -> System variables; 设置了变量 CLASSPATH 2) 重新启动控制台并键入 echo %CLASSPATH%,CLASSPATH
我已经看过这篇文章了PHP doesn't see mysql extension ,但这对我没有帮助。 我使用: Windows Seven(在虚拟机中为 32 位,在真实电脑上为 64 位) 带
当我尝试通过输入 python3 来验证 Python3 是否可以看到 Django 时其次是 import django进入终端(这样我就可以打印 Django 的版本号),我得到以下错误: Tra
我已经使用 easy_install 安装了 pygraphviz但是当我启动 python 时出现错误: >>>import pygraphviz as pgv Traceback (most re
在向 Microsoft 报告之前,我想在这里问一下。我有一个问题,我无法看到我的 WinUI 3 应用程序的实时可视化树。我什至看不到应用程序内工具栏。我可以在 WPF 和 UWP 应用程序中看到,
我对缺乏基本的了解和 内。 我希望看到 39 个 svg 子元素,100 像素高,每个子元素中都有清晰的文本。 http://jsfiddle.net/pn5sj8ge/ 最佳答案 发生这种情况的原因
我正在尝试设置一个新的持续集成服务器,该服务器利用 Phing 和 PHPUnit 自动运行测试用例。 我已经用 Pear 安装了 Phing: pear channel-discover pear.
lua -e "print(package.path)" ./?.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua;/usr/lib
我刚刚从 https://github.com/llvm/llvm-project.git 安装了 clang++ 和 libc++ .尝试运行时: clang main.cpp -stdlib=li
我一直在使用 Highstock 图表,我注意到当图表中有很多点时,无法使用工具提示查看最后一个点: 您可以看到工具提示显示了 5 月 9 日的点,而还有一个显示 5 月 10 日的点(正如您在范围选
This question already has answers here: error_log message is truncated when using print_r (5个答案) 1年前
我在编写 Selenium 测试来检查我的应用程序时遇到问题。我想测试的是,当用户输入正确的登录名/密码时,会显示正确的页面并且用户已登录。 主要问题是我的登录表单是作为 AngularJS 指令生成
我正在尝试在 Azure 服务上发布我的 ASP.NET Core 应用程序。这有效,但是当我尝试使用应用程序功能时,我收到消息 Your App Service app is up and runn
在我的 ionic 应用程序中,我有一个功能,用户应该在应用程序的导航栏中看到水平点线,单击它们,然后应该出现一个弹出菜单,其中包含两个菜单项(添加到收藏夹并添加评论)。下图说明了我的观点。 问题是这
我是一名优秀的程序员,十分优秀!