Skip to content

Instantly share code, notes, and snippets.

View srigalamilitan's full-sized avatar
🌴
On vacation

krisna putra srigalamilitan

🌴
On vacation
View GitHub Profile
@srigalamilitan
srigalamilitan / Log Hikari
Created November 7, 2017 07:20
Hikari add Connection when application need it
2017-11-07 15:19:00.675 DEBUG 18568 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool - Added connection com.mysql.jdbc.JDBC4Connection@571501ef
2017-11-07 15:19:01.046 DEBUG 18568 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool - Added connection com.mysql.jdbc.JDBC4Connection@234ff7e8
2017-11-07 15:19:01.053 DEBUG 18568 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool - Added connection com.mysql.jdbc.JDBC4Connection@132081db
2017-11-07 15:19:01.830 DEBUG 18568 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool - Added connection com.mysql.jdbc.JDBC4Connection@7676e4b7
2017-11-07 15:19:01.839 DEBUG 18568 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool - Added connection com.mysql.jdbc.JDBC4Connection@7daf0fee
2017-11-07 15:19:01.872 DEBUG 18568 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool - Added connection com.mysql.jdbc.JDBC4Connection@69d9d01

Rework Email Notif

Tujuan Mengurangi ketergantungan ke modul-modul yang mengunakan email notif untuk menyediakan variable/paramater yang dibutuhkan oleh template. Ketika terjadi perubahan template dengan penambahan variable tidak perlu merubah code pada modul-modul yang menggunakan template yang dilakukan perubahan.

Kebutuhan Penggunaan Email Notification RWK1 adalah

  1. Menyediakan Template yang digunakan
        <html>
            <body>
                Member Code : ${headers.ctx.P_INS_CODE}

Member Name : ${headers.ctx.P_INS_NAME}

@srigalamilitan
srigalamilitan / [Result]Learn_StringUtils.java
Created February 15, 2016 09:16
Learn_StringUtils apache common lang3 www.putracode.com
"C:\Program Files\Java\jdk1.8.0_51\bin\java" -Didea.launcher.port=7535 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.4\bin" -Dfile.encoding=windows-1252 -classpath "C:\Program Files\Java\jdk1.8.0_51\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\jaccess.jar;C
@srigalamilitan
srigalamilitan / Learn_StringUtils.java
Created February 15, 2016 09:11
Learn_StringUtils apache commons lang3 www.putracode.com
package com.putracode.common;
import org.apache.commons.lang3.StringUtils;
import static org.apache.commons.lang3.StringUtils.*;
import static com.putracode.Util.*;
/**
* Created by KrisnaPutra on 2/15/2016.
*/
public class Learn_StringUtils {
public static void main(String[] args) {
@srigalamilitan
srigalamilitan / [Result]Learn_FastDateFormat.java
Created February 14, 2016 16:02
[Result]Learn_FastDateFormat.java www.putracode.com
"C:\Program Files\Java\jdk1.8.0_51\bin\java" -Didea.launcher.port=7534 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.4\bin" -Dfile.encoding=windows-1252 -classpath "C:\Program Files\Java\jdk1.8.0_51\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\jaccess.jar;C
package com.putracode.time;
import org.apache.commons.lang3.SystemUtils;
import org.apache.commons.lang3.time.FastDateFormat;
import java.util.Date;
import static com.putracode.Util.*;
/**
* Created by KrisnaPutra on 2/14/2016.
*/
@srigalamilitan
srigalamilitan / Learn_randomUtilsAndRandomStringUtils
Created February 14, 2016 15:16
Result of Learn_RandomUtilsAndRandomStringUtils.java www.putracode.com
"C:\Program Files\Java\jdk1.8.0_51\bin\java" -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.4\bin" -Dfile.encoding=windows-1252 -classpath "C:\Program Files\Java\jdk1.8.0_51\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\jaccess.jar;C
package com.putracode.common;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.RandomUtils;
import java.util.HashMap;
import java.util.Map;
import static com.putracode.Util.*;
/**
* Created by KrisnaPutra on 2/13/2016.
@srigalamilitan
srigalamilitan / ResultLearn_SystemUtils.java
Created February 13, 2016 14:40
Implentation SystemUtils Apache Commons-lang3 www.putracode.com
"C:\Program Files\Java\jdk1.8.0_51\bin\java" -Didea.launcher.port=7534 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.4\bin" -Dfile.encoding=windows-1252 -classpath "C:\Program Files\Java\jdk1.8.0_51\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_51\jre\lib\ext\jaccess.jar;C
@srigalamilitan
srigalamilitan / Learn_SystemUtils.java
Created February 13, 2016 14:40
Implentation SystemUtils Apache Commons-lang3 www.putracode.com
package com.putracode.common;
import static org.apache.commons.lang3.SystemUtils.*;
import static com.putracode.Util.*;
/* Created by KrisnaPutra on 2/13/2016.*/
public class Learn_SystemUtils {
public static void main(String[] args) {
printTitle("Learn Using SystemUtils Apache Commons-lang3 ");
println("****Static Variable*****");