Archive for 1월, 2016

retrofit dynamic converter for 1.x

2016/01/29

retrofit 1.x does not support multiple converter.

using factory pattern!

 

spring boot properties encryption with jasypt

2016/01/29

reference : https://github.com/ulisesbocchio/jasypt-spring-boot

build.gradle
compile(‘com.github.ulisesbocchio:jasypt-spring-boot-starter:1.4-java7’)

Application.java
@EnableEncryptableProperties
public class Application {

}

PropertyEncryptConfig.java
@Configuration
public class PropertyEncryptConfig {
@Bean
static public StringEncryptor stringEncryptor() {
PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
SimpleStringPBEConfig config = new SimpleStringPBEConfig();
config.setPassword(“password”);
config.setAlgorithm(“PBEWithMD5AndDES”);
config.setKeyObtentionIterations(“1000”);
config.setPoolSize(“1”);
config.setProviderName(“SunJCE”);
config.setSaltGeneratorClassName(“org.jasypt.salt.RandomSaltGenerator”);
config.setStringOutputType(“base64”);
encryptor.setConfig(config);
return encryptor;
}
}

application.properties
yourkey=ENC(XXXXXXXXXXXXXXXXXXXXXXX)

very nice!

Spring Cloud cioher password security

2016/01/29

http://projects.spring.io/spring-cloud/spring-cloud.html#_encryption_and_decryption_2

내 삼성 디바이스에서 보냈습니다

Home · Kixeye/janus client load balancer

2016/01/27

https://github.com/Kixeye/janus/wiki

내 삼성 디바이스에서 보냈습니다

[FAQ] Jenkins Build Latest Git Tag

2016/01/27

from http://erics-notes.blogspot.kr/2013/05/jenkins-build-latest-git-tag.html

tag name : ex) release/v1.0.0   release/v1.0.1 …

GIT
Refspec : +refs/tags/release/*:refs/remotes/origin/tags/release/*
branch to build : */tags/release/*

 

TIL

2016/01/26

undertow 설정 – springio1.3.2에서 bootrun 시 서비스 안되는 오류를 해결함

spring security default settjng 설정함

jenkins credential key 공유방법을 찾음 – credential.xml  id를 강제로 변경

맛만 보자 Undertow servlet container

2016/01/23

I’ve shared a SlideShare with you!

맛만 보자 Undertow

by jbugkorea

Sent with SlideShare for Android

내 삼성 디바이스에서 보냈습니다

[FAQ] Swagger – Uncaught TypeError

2016/01/22

Uncaught TypeError: Cannot read property ‘showStatus’ of undefined

rest controller 에서 nodeType, nodeName 이라는 parameter명을 정의했더니,

위와같은 오류가 발생함.

이와 유사하게 오류가 발생하면, 혹시 swagger가 사용하는 javascript 객체 중에서 이미 사용하는 이름을 rest param 으로 사용하고 있는건 아닌지 확인할 것.

 

gradle plugin version scm

2016/01/21

https://github.com/nemerosa/versioning

내 삼성 디바이스에서 보냈습니다

[FAQ] gradle asciidoctorj-pdf 한글

2016/01/19
  1. gradle asciidoctor 설정
    buildscript {
    dependencies {
    classpath(“org.asciidoctor:asciidoctor-gradle-plugin:+”)
    }
    }
    apply plugin: “org.asciidoctor.convert”
    asciidoctor {
    sourceDir project.file(‘doc’)
    backends = [‘html5’]
    options doctype: ‘book’, eruby: ‘erubis’
    attributes ‘toc’:’left’, ‘icons’: ‘font’, ‘setanchors’:’true’, ‘source-highlighter’: ‘coderay’
    }
  2. pdf 추가
    buildscript {
    dependencies {
    classpath(“org.asciidoctor:asciidoctor-gradle-plugin:+”)
    classpath ‘org.asciidoctor:asciidoctorj-pdf:+’
    }
    }
    apply plugin: “org.asciidoctor.convert”
    asciidoctor {
    sourceDir project.file(‘doc’)
    backends = [‘html5′,’pdf’]
    options doctype: ‘book’, eruby: ‘erubis’
    attributes ‘toc’:’left’, ‘icons’: ‘font’, ‘setanchors’:’true’, ‘source-highlighter’: ‘coderay’
    }
  3. pdf 생성은 잘 되는데, 한글이 표시되지 않음…
    researching is below ….
    CJK font : https://github.com/chloerei/asciidoctor-pdf-cjk-kai_gen_gothic
    asciidoctor themeing guide : https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc

    theme example : https://github.com/chloerei/asciidoctor-pdf-cjk-kai_gen_gothic/blob/master/data/themes/KaiGenGothicKR-theme.yml

  4. result
    1) copy KaiGenGothicKR-*.ttf , RobotoMono-*.ttf  to doc/fonts
    2) copy KaiGenGothicKR-theme.yml to doc/themes
    3) edit build.gradle
    asciidoctor {

    attributes … ,
    ‘pdf-style’ : ‘themes/KR-theme.yml’, ‘pdf-fontsdir’ : ‘fonts’
    }
  5. generate pdf
    gradlew asciidoctor