Skip to content

Instantly share code, notes, and snippets.

View namkyu's full-sized avatar

Namkyu Lee namkyu

View GitHub Profile
@namkyu
namkyu / SpringDataElasticsearchEntity.java
Created December 19, 2017 05:34
spring data elasticsearch #elasticsearch
@Getter
@Setter
@NoArgsConstructor
@lombok.ToString
@Document(indexName = "#{indexNameHandler.handle('page_view_goods_detail')}", type = CurationESName.Constants.TYPE_PAGE_VIEW_GOODS_DETAIL)
public class PageViewGoodsDetail {
@Id
private String id;
@namkyu
namkyu / SpringEL.java
Created December 15, 2017 07:41
spring EL #spring
@Value("#{itemBean}")
private Item item;
@Value("#{itemBean.name}")
private String itemName;
@Value("#{itemBean.getName()}")
private String itemName;
@Value("10") //inject interger directly
@namkyu
namkyu / Date.java
Last active December 15, 2017 06:03
Date #java8
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd");
LocalDate localDate = LocalDate.parse("2017/06/10", formatter);
System.out.println(String.format("%02d", localDate.getMonthValue()));
LocalDate localDate = LocalDate.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
String formattedString = localDate.format(formatter);
// 전 월 구하기
LocalDate localDate = LocalDate.now();
@namkyu
namkyu / elasticsearch_query_dsl.md
Last active December 8, 2017 06:11
elasticsearch query DSL #elasticsearch

검색

curl -XGET 'http://localhost:9200/_search?pretty'
curl -XGET 'http://localhost:9200/get-together/_search?pretty'
curl -XGET 'http://localhost:9200/get-together/event/_search?pretty'

모든 문서와 매치

@namkyu
namkyu / elasticsearch_command.md
Last active January 29, 2018 07:56
elasticsearch command #elasticsearch

Index 제거

curl -XDELETE http://localhost:9200/nklee

Index 생성

curl -XPUT 'http://localhost:9200/nklee/' -d '{
    "settings": {
        "index": {
@namkyu
namkyu / markdown.md
Last active June 6, 2025 16:40
markdown #markdown

헤더

This is a H1

This is a H2

This is a H3

This is a H4

This is a H5
This is a H6
@namkyu
namkyu / git_command.md
Last active May 10, 2018 08:02
git command #git

브랜치 전환

git checkout master

커밋

git commit -m "index.jsp 추가"
@namkyu
namkyu / JVMOption.txt
Created November 17, 2017 05:30
jvm option #java
-Dspring.profiles.active=op -XX:MaxPermSize=128m -Xms128m -Xmx128m -javaagent:C:/jdk1.7.0_25/springloaded-1.2.5.RELEASE.jar -noverify
@namkyu
namkyu / ModelMapper.java
Created November 9, 2017 02:43
modelmapper library #java
public class ModelMapperTest {
private ModelMapper modelMapper;
@Before
public void before() {
modelMapper = new ModelMapper();
}
@Test
@namkyu
namkyu / chrome_shortcut.md
Last active November 9, 2017 00:28
chrome shortcut #shortcut
  • F6 : 검색 주소창으로 이동
  • Ctrl + T : 새탭
  • Space : 페이지 아래로 스크롤하기