Skip to content

Commit

Permalink
Improve unsupported properties in SpringDataJPAProcessor
Browse files Browse the repository at this point in the history
Also improve the Javadoc of sqlLoadScript as multiple files are
supported now.

(cherry picked from commit bf8e4f2)
  • Loading branch information
gsmet committed Jun 18, 2024
1 parent bed47fc commit 1d40fda
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ public interface HibernateOrmConfigPersistenceUnit {

// @formatter:off
/**
* Path to a file containing the SQL statements to execute when Hibernate ORM starts.
* Paths to files containing the SQL statements to execute when Hibernate ORM starts.
*
* The file is retrieved from the classpath resources,
* so it must be located in the resources directory (e.g. `src/main/resources`).
* The files are retrieved from the classpath resources,
* so they must be located in the resources directory (e.g. `src/main/resources`).
*
* The default value for this setting differs depending on the Quarkus launch mode:
*
Expand Down Expand Up @@ -82,7 +82,7 @@ public interface HibernateOrmConfigPersistenceUnit {
* @asciidoclet
*/
// @formatter:on
@ConfigDocDefault("import.sql in DEV, TEST ; no-file otherwise")
@ConfigDocDefault("import.sql in dev and test modes ; no-file otherwise")
Optional<List<@WithConverter(TrimmedStringConverter.class) String>> sqlLoadScript();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,12 @@ private void detectAndLogSpecificSpringPropertiesIfExist() {
case SPRING_DATASOURCE_DATA:
notSupportedProperties = notSupportedProperties + "\t- " + QUARKUS_HIBERNATE_ORM_SQL_LOAD_SCRIPT
+ " could be used to load data instead of " + SPRING_DATASOURCE_DATA
+ " but it does not support either comma separated list of resources or resources with ant-style patterns as "
+ " but it does not support ant-style patterns as "
+ SPRING_DATASOURCE_DATA
+ " does, it accepts the name of the file containing the SQL statements to execute when when Hibernate ORM starts.\n";
+ " does, it accepts the name of files containing the SQL statements to execute when Hibernate ORM starts.\n";
break;
default:
notSupportedProperties = notSupportedProperties + "\t- " + sp + "\n";
notSupportedProperties = notSupportedProperties + "\t- " + sp + " does not have a Quarkus equivalent\n";
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void ensureProperQuarkusPropertiesLogged() {
.contains(
"spring.jpa.hibernate.naming.implicit-strategy should be replaced by quarkus.hibernate-orm.implicit-naming-strategy")
.contains(
"quarkus.hibernate-orm.sql-load-script could be used to load data instead of spring.datasource.data but it does not support either comma separated list of resources or resources with ant-style patterns as spring.datasource.data does, it accepts the name of the file containing the SQL statements to execute when when Hibernate ORM starts");
"quarkus.hibernate-orm.sql-load-script could be used to load data instead of spring.datasource.data but it does not support ant-style patterns as spring.datasource.data does, it accepts the name of files containing the SQL statements to execute when Hibernate ORM starts");
});
});
});
Expand Down

0 comments on commit 1d40fda

Please sign in to comment.