Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit b5ca952

Browse files
Modify GrailsLiquibase to use Spring's ResourceAccessor
1 parent 711b4b3 commit b5ca952

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/groovy/org/grails/plugins/databasemigration/liquibase/GrailsLiquibase.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import liquibase.database.Database
2121
import liquibase.exception.DatabaseException
2222
import liquibase.exception.LiquibaseException
2323
import liquibase.integration.spring.SpringLiquibase
24-
import liquibase.resource.ClassLoaderResourceAccessor
2524
import liquibase.resource.ResourceAccessor
2625
import org.springframework.context.ApplicationContext
26+
import org.springframework.core.io.DefaultResourceLoader
2727

2828
import java.sql.Connection
2929

@@ -42,11 +42,12 @@ class GrailsLiquibase extends SpringLiquibase {
4242

4343
GrailsLiquibase(ApplicationContext applicationContext) {
4444
this.applicationContext = applicationContext
45+
this.resourceLoader = new DefaultResourceLoader()
4546
}
4647

4748
@Override
4849
protected Liquibase createLiquibase(Connection connection) throws LiquibaseException {
49-
Liquibase liquibase = new Liquibase(getChangeLog(), new ClassLoaderResourceAccessor(), createDatabase
50+
Liquibase liquibase = new Liquibase(getChangeLog(), createResourceOpener(), createDatabase
5051
(connection, null))
5152
liquibase.setIgnoreClasspathPrefix(isIgnoreClasspathPrefix())
5253
if (parameters != null) {

0 commit comments

Comments
 (0)