출처: http://whitegom.tistory.com/3 Path 설정을 해주게 되면 실행할 파일이 있는 해당 폴더가 아니여도 실행 할 수 있다. 쉽게 예를 들면 메모장의 경우에는 C:\Windows\System32\notepad.exe 경로에 있으나 Path설정이 되어 있기 때문에 해당 폴더로 접근하지 않고, 실행창이나 cmd모드의 창에서 notepad라는 명령어를 입력하면 메모창이 실행된다. 이처럼 환경변수를 설정 하는 이유는 컴퓨터 어떠한 곳이라도 java프로그램을 접근할 수있도록 해주기 위함이다. JDK를 설치하게 되면 java명령어는 사용이 가능하지만 javac와 같은 명령은 사용이 되지 않는다. JDK를 설치하게 되면 JDK와 JRE 2가지폴더가 설치되게 된다. JDK폴더에는 api와 컴파..
Java I/O file made by Petr Mitrichev - 특징 : scanner가 아닌 stream을 이용하기 때문에 성능이 좋다 import java.io.*;import java.util.ArrayList;import java.util.PriorityQueue;import java.util.StringTokenizer;public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new Pri..
■ Gradle에서 Reactive Streams 라이브러리 추가 시 // https://mvnrepository.com/artifact/org.reactivestreams/reactive-streamscompile group: 'org.reactivestreams', name: 'reactive-streams', version: '0.4.0.M2'// Reactive Streamscompile "org.reactivestreams:reactive-streams:1.0.1" ■ Gradle에서 slf4j 라이브러리 추가 시//slf4jcompile 'org.slf4j:slf4j-api:1.7.5'//compile 'org.slf4j:slf4j-simple:1.7.5' ■ Gradle에서 log4j 라이브..
(시청일 : 20180114) - https://www.youtube.com/watch?v=bc4wTgA_2Xk ■ 예제 1package toby.tobytv014;import lombok.AllArgsConstructor;import lombok.Data;import lombok.extern.slf4j.Slf4j;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotatio..
(시청일 : 20170114) - https://www.youtube.com/watch?v=LK6NRV8tZBM - 스프링 5.0 WebFlux에서 사용되는 Reactor의 Mono의 기본 동작방식을 살펴봅니다. ■ 예제 1package toby;import lombok.extern.slf4j.Slf4j;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.Rest..
(시청일 : 20170114) - https://www.youtube.com/watch?v=ScH7NZU_zvk - 책 추천 : RXJava를 활용한 리액티브 프로그래밍 ■ 프로젝트 환경- 스프링부트 버전 : SpringBoot 2.0 M1- 스프링 프레임워크 버전 : SpringFramework 5.0 RC1- Core : Lombok- Web : Reactive Web (Web과 Reactive Web는 서로 배타적이라 한 프로젝트에 동시에 적용될 수 없다. 두가지 모두 선택하게 되면 Web이 우선시된다) ■ 예제 1/* ** LoadTest.java **/package toby.live; import lombok.extern.slf4j.Slf4j;import org.springframework.ut..
(시청일 : 20180113) - https://www.youtube.com/watch?v=PzxV-bmLSFY - https://m.blog.naver.com/PostView.nhn?blogId=goddes4&logNo=30188460262&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F - http://www.hungrydiver.co.kr/bbs/detail/develop?id=2&scroll=comment(중략) 그 동안 java 에서 제공하던 Future interface 가 제공한 Async 이지만 get() 메서드로 Blocking 을 유발하는 단점이 있었다.이런 불편함은 Spring Framework에서 제공하는 LinstenableFuture 로 해소 ..
(시청일 : 20171126) - https://www.youtube.com/watch?v=Tb43EyWTSlQ ■ LoadTest.javapackage toby.live;import lombok.extern.slf4j.Slf4j;import org.springframework.util.StopWatch;import org.springframework.web.client.RestTemplate;import java.util.concurrent.*;import java.util.concurrent.atomic.AtomicInteger;@Slf4jpublic class LoadTest { static AtomicInteger counter = new AtomicInteger(0); public static ..
(시청일 : 20171119) [스프링 리액티브 웹 개발 5부. 비동기 RestTemplate과 비동기 MVC의 결합]- https://www.youtube.com/watch?v=ExUfZkh7Puk - CyclicBarrier : 자바에서 사용하는 simple 동기화 기법 CallableRunnable리턴값 존재 여부ㅇXException 던지도록 선언되어있는지 여부ㅇX - ListenableFuture : 비동기 작업 결과를 가져올 수 있는 future 타입인데, 성공/실패 시의 콜백을 등록할 수 있다. - DeferredResult : 컨트롤러의 리턴을 별도의 작업에서 할 수 있게 해준다. 하지만 이스레드는 스프링에의해 관리 되는 것이 아니다. DeferredResult클래스는 어떤 요청에 대한 응답..