Error creating bean with name 'liquibase' defined in class path resource [com/zone/lqbs/base/config/LiquibaseConfig.class]: Invocation of init method failed; nested exception is liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: Error parsing line 8 column 83 of liquibase/changelog/ddl/ddl-project-1.0.xml: cvc-complex-type.3.2.2: 元素 'changeSet' 中不允许出现属性 'order'。
时间: 2024-04-10 08:31:06 浏览: 6
根据您提供的错误信息,看起来在解析liquibase changelog文件时出现了问题。错误消息指出`cvc-complex-type.3.2.2: 元素 'changeSet' 中不允许出现属性 'order'`,这意味着在`changeSet`元素中不允许使用`order`属性。
根据liquibase的文档,确实没有名为`order`的属性。如果您尝试在`changeSet`元素中使用`order`属性,将会导致解析错误。
如果您想要指定changeSet的执行顺序,可以使用`id`属性来代替。请确保为每个changeSet定义一个唯一的id,并且按照所需的执行顺序对它们进行排序。
例如:
```xml
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
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.8.xsd">
<changeSet id="1" author="yourname">
<!-- changeSet内容 -->
</changeSet>
<changeSet id="2" author="yourname">
<!-- changeSet内容 -->
</changeSet>
</databaseChangeLog>
```
请确保检查并更新您的changelog文件,确保没有使用不支持的属性,然后重新运行应用程序。这应该解决您遇到的问题。