Skip to content

Instantly share code, notes, and snippets.

Avatar

Andres Almiray aalmiray

View GitHub Profile
@aalmiray
aalmiray / DataSourceConfig.java
Last active Jul 31, 2020
SpringBoot + Oracle JDBC
View DataSourceConfig.java
package com.acme.ucp;
import oracle.ucp.jdbc.PoolDataSource;
import oracle.ucp.jdbc.PoolDataSourceFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import javax.sql.DataSource;
@aalmiray
aalmiray / application.yml
Last active May 11, 2020
Micronaut + Oracle JDBC
View application.yml
datasources:
default:
url: ${JDBC_URL:`jdbc:oracle:thin:@localhost:1521/XEPDB1`}
username: ${JDBC_USER:system}
password: ${JDBC_PASSWORD:S3cr3TP4$$wd}
driverClassName: ${JDBC_DRIVER:oracle.jdbc.driver.OracleDriver}
@aalmiray
aalmiray / pom.xml
Created May 11, 2020
Helidon + Oracle JDBC/UCP
View pom.xml
<properties>
<version.lib.ojdbc8>19.6.0.0</version.lib.ojdbc8>
</properties>
<dependency>
<groupId>io.helidon.integrations.cdi</groupId>
<artifactId>helidon-integrations-cdi-datasource-ucp</artifactId>
</dependency>
View build.gradle
repositories {
mavenCentral()
}
dependencies {
implementation 'com.oracle.database.jdbc:ojdbc8:19.6.0.0'
implementation 'com.oracle.database.jdbc:ucp:19.6.0.0'
}
@aalmiray
aalmiray / build.gradle
Last active May 4, 2020
Kordamp settings for publishing to Maven Central via Bintray
View build.gradle
plugins {
id 'java-library'
id 'org.kordamp.gradle.java-project' version '0.35.0'
id 'org.kordamp.gradle.bintray' version '0.35.0'
}
if (!project.hasProperty('bintrayUsername')) ext.bintrayUsername = '**undefined**'
if (!project.hasProperty('bintrayApiKey')) ext.bintrayApiKey = '**undefined**'
if (!project.hasProperty('sonatypeUsername')) ext.sonatypeUsername = '**undefined**'
if (!project.hasProperty('sonatypePassword')) ext.sonatypePassword = '**undefined**'
@aalmiray
aalmiray / base-pom.xml
Last active Mar 31, 2020
Mastering Maven 05
View base-pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.acme</groupId>
<artifactId>sample05</artifactId>
<version>0.0.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
@aalmiray
aalmiray / decrypt_secret.sh
Last active Mar 26, 2020
OCI Gradle Cache plugin
View decrypt_secret.sh
#!/bin/sh
gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_PASSPHRASE" \
--output $HOME/.github-secrets.tar .github-secrets.tar.gpg
tar xvf $HOME/.github-secrets.tar
@aalmiray
aalmiray / basic-pom.xml
Created Mar 11, 2020
MasteringMaven-04
View basic-pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.acme</groupId>
<artifactId>sample04</artifactId>
<version>0.0.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
@aalmiray
aalmiray / Sample.java
Last active Jan 20, 2020
MasteringMaven-03
View Sample.java
package com.acme;
import static org.apache.commons.lang3.StringUtils.capitalize;
public class Sample {
public String greeting() {
return capitalize("hello world");
}
public static void main(String[] args) {
@aalmiray
aalmiray / README.adoc
Created Jan 20, 2020
Mastering Maven
View README.adoc

Mastering Maven

This repository contains the source code for all samples of the Mastering Maven blog series.

You can’t perform that action at this time.