-
Notifications
You must be signed in to change notification settings - Fork 40.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use different default database names for Oracle XE and Oracle Free
Closes gh-38476
- Loading branch information
1 parent
2323c7a
commit a7571cf
Showing
14 changed files
with
234 additions
and
42 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
...va/org/springframework/boot/docker/compose/service/connection/oracle/OracleContainer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright 2012-2023 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.springframework.boot.docker.compose.service.connection.oracle; | ||
|
||
/** | ||
* Enumeration of supported Oracle containers. | ||
* | ||
* @author Andy Wilkinson | ||
*/ | ||
enum OracleContainer { | ||
|
||
FREE("gvenzl/oracle-free", "freepdb1"), | ||
|
||
XE("gvenzl/oracle-xe", "xepdb1"); | ||
|
||
private final String imageName; | ||
|
||
private final String defaultDatabase; | ||
|
||
OracleContainer(String imageName, String defaultDatabase) { | ||
this.imageName = imageName; | ||
this.defaultDatabase = defaultDatabase; | ||
} | ||
|
||
String getImageName() { | ||
return this.imageName; | ||
} | ||
|
||
String getDefaultDatabase() { | ||
return this.defaultDatabase; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...ompose/service/connection/oracle/OracleFreeJdbcDockerComposeConnectionDetailsFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2012-2023 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.springframework.boot.docker.compose.service.connection.oracle; | ||
|
||
import org.springframework.boot.autoconfigure.jdbc.JdbcConnectionDetails; | ||
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory; | ||
|
||
/** | ||
* {@link DockerComposeConnectionDetailsFactory} to create {@link JdbcConnectionDetails} | ||
* for an {@link OracleContainer#FREE} service. | ||
* | ||
* @author Andy Wilkinson | ||
*/ | ||
class OracleFreeJdbcDockerComposeConnectionDetailsFactory extends OracleJdbcDockerComposeConnectionDetailsFactory { | ||
|
||
protected OracleFreeJdbcDockerComposeConnectionDetailsFactory() { | ||
super(OracleContainer.FREE); | ||
} | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
...mpose/service/connection/oracle/OracleFreeR2dbcDockerComposeConnectionDetailsFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2012-2023 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.springframework.boot.docker.compose.service.connection.oracle; | ||
|
||
import org.springframework.boot.autoconfigure.r2dbc.R2dbcConnectionDetails; | ||
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory; | ||
|
||
/** | ||
* {@link DockerComposeConnectionDetailsFactory} to create {@link R2dbcConnectionDetails} | ||
* for an {@link OracleContainer#FREE} service. | ||
* | ||
* @author Andy Wilkinson | ||
*/ | ||
class OracleFreeR2dbcDockerComposeConnectionDetailsFactory extends OracleR2dbcDockerComposeConnectionDetailsFactory { | ||
|
||
protected OracleFreeR2dbcDockerComposeConnectionDetailsFactory() { | ||
super(OracleContainer.FREE); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
.../compose/service/connection/oracle/OracleXeJdbcDockerComposeConnectionDetailsFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2012-2023 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.springframework.boot.docker.compose.service.connection.oracle; | ||
|
||
import org.springframework.boot.autoconfigure.jdbc.JdbcConnectionDetails; | ||
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory; | ||
|
||
/** | ||
* {@link DockerComposeConnectionDetailsFactory} to create {@link JdbcConnectionDetails} | ||
* for an {@link OracleContainer#XE} service. | ||
* | ||
* @author Andy Wilkinson | ||
*/ | ||
class OracleXeJdbcDockerComposeConnectionDetailsFactory extends OracleJdbcDockerComposeConnectionDetailsFactory { | ||
|
||
protected OracleXeJdbcDockerComposeConnectionDetailsFactory() { | ||
super(OracleContainer.XE); | ||
} | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
...compose/service/connection/oracle/OracleXeR2dbcDockerComposeConnectionDetailsFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2012-2023 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.springframework.boot.docker.compose.service.connection.oracle; | ||
|
||
import org.springframework.boot.autoconfigure.r2dbc.R2dbcConnectionDetails; | ||
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory; | ||
|
||
/** | ||
* {@link DockerComposeConnectionDetailsFactory} to create {@link R2dbcConnectionDetails} | ||
* for an {@link OracleContainer#XE} service. | ||
* | ||
* @author Andy Wilkinson | ||
*/ | ||
class OracleXeR2dbcDockerComposeConnectionDetailsFactory extends OracleR2dbcDockerComposeConnectionDetailsFactory { | ||
|
||
protected OracleXeR2dbcDockerComposeConnectionDetailsFactory() { | ||
super(OracleContainer.XE); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.