This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev-2.1.5
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev-2.1.5 by this push:
new 47215e649 [Bug] pgsql syntax minor bug fixed #3714
47215e649 is described below
commit 47215e649bb7bca010877f77d515be9243ab729d
Author: benjobs <[email protected]>
AuthorDate: Fri May 17 08:20:29 2024 +0800
[Bug] pgsql syntax minor bug fixed #3714
---
.../console/base/config/MybatisConfig.java | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/MybatisConfig.java
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/MybatisConfig.java
index 27730f5c5..2cd08e5b1 100644
---
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/MybatisConfig.java
+++
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/MybatisConfig.java
@@ -56,9 +56,7 @@ public class MybatisConfig {
* @return {@linkplain PostgreSQLQueryInterceptor}
*/
@Bean
- @ConditionalOnProperty(
- name = {"datasource.dialect", "spring.profiles.active"},
- havingValue = "pgsql")
+ @ConditionalOnProperty(name = "datasource.dialect", havingValue = "pgsql")
public PostgreSQLQueryInterceptor postgreSQLQueryInterceptor() {
return new PostgreSQLQueryInterceptor();
}
@@ -69,13 +67,23 @@ public class MybatisConfig {
* @return {@linkplain PostgreSQLPrepareInterceptor}
*/
@Bean
- @ConditionalOnProperty(
- name = {"datasource.dialect", "spring.profiles.active"},
- havingValue = "pgsql")
+ @ConditionalOnProperty(name = "datasource.dialect", havingValue = "pgsql")
public PostgreSQLPrepareInterceptor postgreSQLPrepareInterceptor() {
return new PostgreSQLPrepareInterceptor();
}
+ @Bean
+ @ConditionalOnProperty(name = "spring.profiles.active", havingValue =
"pgsql")
+ public PostgreSQLQueryInterceptor
postgreSQLQueryInterceptorForCompatibility() {
+ return new PostgreSQLQueryInterceptor();
+ }
+
+ @Bean
+ @ConditionalOnProperty(name = "spring.profiles.active", havingValue =
"pgsql")
+ public PostgreSQLPrepareInterceptor
postgreSQLPrepareInterceptorForCompatibility() {
+ return new PostgreSQLPrepareInterceptor();
+ }
+
/**
* mybatis plus setting
*