17
17
recipeList :
18
18
19
19
# For pom.xml
20
+ - org.openrewrite.java.dependencies.RemoveDependency :
21
+ GroupId : com.oracle.database.jdbc
22
+ ArtifactId : ojdbc*
20
23
- org.openrewrite.java.dependencies.RemoveDependency :
21
24
groupId : com.zaxxer*
22
25
artifactId : HikariCP*
@@ -29,6 +32,80 @@ recipeList:
29
32
artifactId : oracle-spring-boot-starter-wallet
30
33
version : 25.1.0
31
34
35
+ # https://docs.openrewrite.org/recipes/java/spring/addspringproperty
36
+ # Add a spring configuration property to a configuration file if it does not already exist in that file.
37
+ - org.openrewrite.java.spring.AddSpringProperty :
38
+ property : spring.datasource.driver-class-name
39
+ value : oracle.jdbc.OracleDriver
40
+ comment : " JDBC driver class"
41
+ pathExpressions : ["**/application.properties"]
42
+
43
+ - org.openrewrite.java.spring.AddSpringProperty :
44
+ property : spring.datasource.type
45
+ value : oracle.ucp.jdbc.PoolDataSource
46
+ comment : specify the connection pool driver to use"
47
+ pathExpressions : ["**/application.properties"]
48
+
49
+ - org.openrewrite.java.spring.AddSpringProperty :
50
+ property : spring.datasource.oracleucp.connection-pool-name
51
+ value : UCPConnectionPool
52
+ comment : " Connection Pool Name"
53
+ pathExpressions : ["**/application.properties"]
54
+
55
+ - org.openrewrite.java.spring.AddSpringProperty :
56
+ property : spring.datasource.oracleucp.max-pool-size
57
+ value : 20
58
+ comment : " Specifies the maximum number of available and borrowed connections that our pool is maintaining"
59
+ pathExpressions : ["**/application.properties"]
60
+
61
+ - org.openrewrite.java.spring.AddSpringProperty :
62
+ property : spring.datasource.oracleucp.min-pool-size
63
+ value : 5
64
+ comment : " Specifies the minimum number of available and borrowed connections that our pool is maintaining"
65
+ pathExpressions : ["**/application.properties"]
66
+
67
+ - org.openrewrite.java.spring.AddSpringProperty :
68
+ property : spring.datasource.oracleucp.initial-pool-size
69
+ value : 10
70
+ comment : " Specifies the number of available connections created after the pool is initiated"
71
+ pathExpressions : ["**/application.properties"]
72
+
73
+ - org.openrewrite.java.spring.AddSpringProperty :
74
+ property : spring.datasource.oracleucp.connection-wait-timeout
75
+ value : 3
76
+ comment : " specifies how long an application request waits to obtain a connection if there are no longer any connections in the pool"
77
+ pathExpressions : ["**/application.properties"]
78
+
79
+ - org.openrewrite.java.spring.AddSpringProperty :
80
+ property : spring.datasource.oracleucp.inactive-connection-timeout
81
+ value : 0
82
+ comment : " Specifies how long an available connection can remain idle before it is closed and removed from the pool"
83
+ pathExpressions : ["**/application.properties"]
84
+
85
+ - org.openrewrite.java.spring.AddSpringProperty :
86
+ property : spring.datasource.oracleucp.max-connection-reuse-time
87
+ value : 0
88
+ comment : " Allows connections to be gracefully closed and removed from a connection pool after a specific amount of time"
89
+ pathExpressions : ["**/application.properties"]
90
+
91
+ - org.openrewrite.java.spring.AddSpringProperty :
92
+ property : spring.datasource.oracleucp.connection-validation-timeout
93
+ value : 15
94
+ comment : " Specifies the duration within which a borrowed connection from the pool is validated"
95
+ pathExpressions : ["**/application.properties"]
96
+
97
+ - org.openrewrite.java.spring.AddSpringProperty :
98
+ property : spring.datasource.oracleucp.fast-connection-failover-enabled
99
+ value : false
100
+ comment : " Enables faster failover for connection attempts"
101
+ pathExpressions : ["**/application.properties"]
102
+
103
+ - org.openrewrite.java.spring.AddSpringProperty :
104
+ property : spring.datasource.oracleucp.validate-connection-on-borrow
105
+ value : false
106
+ comment : " Whether to validate connections when borrowed from the pool"
107
+ pathExpressions : ["**/application.properties"]
108
+
32
109
# spring.datasource.oracleucp.connection-factory-class: oracle.jdbc.pool.OracleDataSource
33
110
- org.openrewrite.java.spring.ChangeSpringPropertyKey :
34
111
oldPropertyKey : spring.datasource.hikari.data-source-class-name
@@ -87,12 +164,6 @@ recipeList:
87
164
oldPropertyKey : spring.datasource.hikari.validation-timeout
88
165
newPropertyKey : spring.datasource.oracleucp.connection-validation-timeout
89
166
90
- # spring.datasource.oracleucp.initial-pool-size
91
- - org.openrewrite.java.spring.AddSpringProperty :
92
- property : spring.datasource.oracleucp.initial-pool-size
93
- value : 5
94
- comment : " Specifies the number of available connections created after the pool is initiated"
95
-
96
167
# HikariCP properties that don’t have identical UCP properties
97
168
- org.openrewrite.java.spring.CommentOutSpringPropertyKey :
98
169
propertyKey : spring.datasource.hikari.auto-commit
0 commit comments