问题
I am trying to add liquibase to my current project. Even after following all the necessary steps, I am getting the following error
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'profileController' defined in URL [jar:file:/C:/Users/if994410/.m2/repository/org/springframework/data/spring-data-rest-webmvc/3.3.0.RELEASE/spring-data-rest-webmvc-
3.3.0.RELEASE.jar!/org/springframework/data/rest/webmvc/ProfileController.class]: Unsatisfied dependency expressed through constructor parameter 0;
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'repositoryRestConfiguration' defined in class path resource
[org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.data.rest.core.config.RepositoryRestConfiguration]: Factory method 'repositoryRestConfiguration' threw exception; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositories' defined in class path resource
[org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.repository.support.Repositories]: Factory method 'repositories' threw exception; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configDataRepository' defined in
net.ssnc.springboot.repository.ConfigDataRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Cannot resolve reference to bean 'jpaMappingContext' while setting bean property
'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested
exception is java.lang.IllegalStateException: Failed to asynchronously initialize native EntityManagerFactory: java.util.ServiceConfigurationError: com.fasterxml.jackson.databind.Module: Provider
com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule not found
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
….. etc.....
This is my changelog master
<?xml version="1.0" encoding="UTF-8"?>
<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">
<include file="changelog-v1.0.xml"/>
</databaseChangeLog>
This is my changelog
<?xml version="1.0" encoding="UTF-8"?>
<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="changelog-v1.0.0" author="xyz">
<addColumn tableName = "schematrack">
<column name = "id" type = "UUID" />
<column name = "s" type = "jsonb" />
<column name = "type" type = "character varying(255)" />
<column name = "version" type = "character varying(255)" />
</addColumn>
</changeSet>
</databaseChangeLog>
Apart from the database integration stuff, this is added in the application.properties
spring.flyway.enabled=false
spring.liquibase.enabled=true
spring.application.name=test
spring.liquibase.change-log=classpath:changelog-master.xml
What changes should I make so that I can get rid of the error? P.S.: The necessary tables (3 of them) were successfully created!
来源:https://stackoverflow.com/questions/62921359/not-able-to-integrate-liquibase-with-my-spring-boot-project-getting-error-with