Skip to content

Instantly share code, notes, and snippets.

@aalmiray
Last active November 4, 2020 23:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aalmiray/ceaac0b5f8f89cd308902d470b1d9e5b to your computer and use it in GitHub Desktop.
Save aalmiray/ceaac0b5f8f89cd308902d470b1d9e5b to your computer and use it in GitHub Desktop.
ATP + JDBC
package com.acme.sample;
public class Application {
static {
System.setProperty("oracle.net.tns_admin",
System.getProperty("user.dir") + File.separator + "wallet");
}
public static void main(String[] args) {
// ...
}
}
jdbc.url=jdbc:oracle:thin:@todos_tpurgent
driverClassName=oracle.jdbc.driver.OracleDriver
username=MyDbUsername
password=$3cR3tP4s$w0rD
repositories {
mavenCentral()
}
dependencies {
implementation("com.oracle.database.jdbc:ojdbc8-production:19.7.0.0")
}
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8-production</artifactId>
<version>19.7.0.0</version>
<type>pom</type>
</dependency>
</dependencies>
repositories {
mavenCentral()
}
dependencies {
implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:19.7.0.0"))
implementation("com.oracle.database.jdbc:ojdbc8")
implementation("com.oracle.database.jdbc:ucp")
implementation("com.oracle.database.security:oraclepki")
implementation("com.oracle.database.security:osdt_core")
implementation("com.oracle.database.security:osdt_cert")
implementation("com.oracle.database.ha:ons")
implementation("com.oracle.database.ha:simplefan")
}
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc-bom</artifactId>
<version>19.7.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ucp</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.security</groupId>
<artifactId>oraclepki</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.security</groupId>
<artifactId>osdt_core</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.security</groupId>
<artifactId>osdt_cert</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.ha</groupId>
<artifactId>ons</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.ha</groupId>
<artifactId>simplefan</artifactId>
</dependency>
</dependencies>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment