Skip to content

Conversation

@philwebb
Copy link
Member

@philwebb philwebb commented Jul 14, 2019

In order to fix this Spring Boot issue we'd like to be able to process quartz SQL scripts that contain comments starting with # or --. Currently our support is limited to just a single prefix.

This pull request adds multi-prefix support to both ResourceDatabasePopulator and ScriptUtils.

philwebb added 2 commits July 14, 2019 12:19
Update `ResourceDatabasePopulator` and `ScriptUtils` so that more than
one comment prefix can be used when processing SQL scripts. This
feature is particularly useful when dealing with scripts provided by
Quartz since they often use a mix `--` and `#`.

Closes spring-projectsgh-23289
@philwebb philwebb force-pushed the resource-database-populator branch from 3ad1741 to 90ac554 Compare July 14, 2019 11:20
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 14, 2019
@sbrannen sbrannen added in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement labels Jul 14, 2019
Copy link
Member

@sbrannen sbrannen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the PR looks pretty good. I only requested a few minor changes for the Javadoc and preconditions.

Thanks for simplifying ScriptUtilsUnitTests as well.

@sbrannen sbrannen removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 14, 2019
@sbrannen sbrannen added this to the 5.2 RC1 milestone Jul 14, 2019
@sbrannen sbrannen self-assigned this Jul 14, 2019
@sbrannen sbrannen closed this in 17914fc Jul 15, 2019
@sbrannen
Copy link
Member

See also gh-23331.

@jbp198669

This comment has been minimized.

sbrannen added a commit to sbrannen/spring-framework that referenced this pull request Jul 24, 2019
spring-projectsgh-23289 introduced support for multiple single-line comment prefixes
for ScriptUtils, ResourceDatabasePopulator, and EmbeddedDatabaseBuilder.

This commit adds the same support for @SqlConfig in the TestContext
Framework. Specifically, @SqlConfig has a new `commentPrefixes`
attribute for setting multiple single-line comment prefixes.

Closes spring-projectsgh-23331
sbrannen added a commit to sbrannen/spring-framework that referenced this pull request Jul 24, 2019
spring-projectsgh-23289 introduced support for multiple single-line comment prefixes
for ScriptUtils, ResourceDatabasePopulator, and EmbeddedDatabaseBuilder.

This commit adds the same support for @SqlConfig in the TestContext
Framework. Specifically, @SqlConfig has a new `commentPrefixes`
attribute for setting multiple single-line comment prefixes.

Closes spring-projectsgh-23331
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this pull request Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants