스프링개발자/201 - 일반
-
14. 스플렁크 Splunk 시작하기스프링개발자/201 - 일반 2020. 7. 25. 12:35
[배경] 우리 팀 spring application API endpoint 를 호출하는 다른 팀이 다음주부터 production stage에 들어간다. 우리 팀 software engineer anchor가 걱정이 많다. 우리 프로젝트가 직접 production에 들어가려면 몇달 남았지만, 이번기회로 프로젝트의 완성도가 높아졌으면 좋겠다. 그래서 도입하는것이 스플렁크 Splunk이다. 우리 회사에서는 라이센스를 가지고 있으므로, 단순히 절차에 따라서 신청만 하면 된다. 하지만 그 이후에 데이터를 어떻게 수집하고 관리하고 분석하고 모니터하고 알림설정하고.. 등등의 활용여부가 제품의 퀄리티 향상 폭을 결정할 것이다. What is Splunk? It is a software for searching, mon..
-
13. 자바 어노테이션을 만들고 task와 함께 사용하자스프링개발자/201 - 일반 2020. 7. 23. 09:13
[배경] 자바로 코딩하다보면, 다음과 같은 어노테이션을 많이 본다 @SpringBootApplication @Override @Controller @RestController @Service @Configuration @Getter 어노테이션은 블랙박스와 같다. 그 안에 뭐가 들어 있는지, 어떻게 행동하는지 분명하진 않지만, 그냥 추가만 하면 마법처럼 작동한다. 이 글에서는 어노테이션의 정의를 알아보며 직접 만들어보고, 어떻게 실제 코드에 사용할지 생각해보자. 어노테이션 역사가 궁금하다면 해당 문서 참고 https://en.wikipedia.org/wiki/Java_annotation#History 1. 어노테이션이 뭐지? 아래 그림의 왼쪽 window 6번줄을 보면 @SpringBootApplicati..
-
12. 그레이들 task 간단히 만들기 - 튜토리얼스프링개발자/201 - 일반 2020. 7. 22. 09:17
[배경] 스프링 개발자라면 maven과 gradle 중에 하나를 빌드 툴로 사용하게 된다. 필요한 외부의 라이브러리(의존성)들을 쉽고 빠르게 import할 수 있다. 본 글은 아래의 gradle의 공식 튜토리얼 문서를 참고 했다. https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#tutorial_using_tasks 1. Hello World `build.gradle` 파일이 핵심 파일이다. 프로젝트 의존성을 관리할 수 있고, task또한 추가 할 수 있어서이다. Everything in Gradle sits on top of two basic concepts: projects and tasks. Gradle에 있는 모든 것들은 결국..
-
11. Proxy를 셋업하자 - (2) 코딩으로스프링개발자/201 - 일반 2020. 7. 22. 06:23
[배경] 프록시의 정의와 필요성을 알았고, JVM을 통해서 프록시 값을 설정하는 법도 배웠다. 코딩으로 프록시를 설정할때 장점이 있다. 1. Configuration 빈을 만든다 프록시에 필요한 필드3개를 필드변수로 넣는다 private String proxyHost; private String proxyPort; private String nonProxyHosts; 2. 위의 지정한 필드값들을 properties파일에서 받아오자 @PropertySource("classpath:my-proxy.properties") 본 어노테이션은 configuration과 함께 사용되야 함 @PropertySource 설명 Annotation providing a convenient and declarative mec..
-
10. Proxy를 셋업하자 - (1) JVM 설정으로스프링개발자/201 - 일반 2020. 7. 22. 06:13
[배경] 회사 네트워크에서 일하다보면, 프록시 설정이 꼭 필요하다 스프링에서 제공하는 프록시 property들을 알아보자 오라클에서 나온 다음의 글을 참고 했다 https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html 1. 프록시가 뭐지? A proxy server allows indirect connection to network services and is used mainly for security (to get through firewalls) and performance reasons (proxies often do provide caching mechanisms). 프록시 서버를 사용함으로, 특정 네트워크 ..
-
9. Merged된 PR을 되돌리자 - Github스프링개발자/201 - 일반 2020. 7. 18. 05:53
[배경] VCS를 사용하면서 남들의 review를 기다리고 있는 PR을 실수로 merge할 수 있다. (오늘 일어났다) 보통은 closed PR 섹션에 들어가면 `revert branch` 라는 버튼이 있으나, 없는 경우도 있다 git commands로 되돌리는 방법이 귀찮긴하지만, 가장 확실한 방법이니 여기서 연습하자 1. 되돌릴 branch와 commit을 생성 git branch test-revert git checkout test-revert 파일을 변경한다 git add . git commit -m "commit to be reverted" git push 2. PR을 만들고 merge를 한다 이 Push Request는 Commit이 두개인걸 확인할 수 있다. 실수로 master 브렌치에 me..
-
8. 젠킨스와 Git repo를 연결해보자 - 완성중스프링개발자/201 - 일반 2020. 7. 16. 12:56
[배경] 젠킨스와 Git repo를 연결한다는게 무슨뜻일까? 보통 내 컴퓨터에 있는 소스코드를, 내 컴퓨터에서 빌드하고 테스트를 하고 jar파일을 만들어서 남에게 배포할 수 있다. 클라우드 시대인 요즘은 위의 같은 절차들을 다른 방식으로 한다. Git repo에 있는 소스코드를, 젠킨스 서버에 있는 slave가 job의 형태로 직접 빌드하고 테스트하고, 원하는 클라우드 플랫폼에 배포까지 할 수 있다. 젠킨스와 Git repo를 연동하는걸 연습해보자. 1. 젠킨스에 Job생성하기 Freestyle-project를 생성했다 젠킨스의 주요 기능을 모아놓은 옵션. 프로젝트를 빌드하고, git등의 scm과도 연동할 수 있으며, 소프트웨어 빌드 이외에도 범용적인 목적으로 쓰인다. 2. 생성된 Job을 설정하기(co..
-
7. 프로젝트 관리 툴 (Jira, Rally, Asana)스프링개발자/201 - 일반 2020. 7. 16. 11:03
[배경] 팀원들끼리 일을 분배하고, 진행사항을 서로 확인할 필요가 있다. Agile방식의 팀에서는, 매일 아침에 standup 미팅을 통해서 자신이 그 전날에 했던 일들, 얼마나 진행되었는지를 공유하고 뿐만 아니라, 다른 팀원들에게 질문도 하고, 도움을 요청하는 시간을 갖는다. 이와 비슷한 이유로 프로젝트 관리 툴이 Agile에서는 참 중요하다. Jira, Rally 등등 좋은 프로그램이 많이 있는데, 다들 추구하는 바는 비슷하다; 여기에서는 Asana(무료버전)을 통해서 프로젝트 관리 툴에 대해 알아본다. 1. Dashboard 프로젝트의 모든 진행과정을 한 눈에 볼 수 있는 데쉬보드 해야 할일들(New Requests) 진행중인 일들(In Progress) 완료 된 일들(Completed) 2. Ta..