본문 바로가기
728x90
반응형

전체 글640

[Spring] - 스프링 URI 생성 UriComponents, UriComponentsBuilder 클래스 사용 방법 #스프링 URI 생성 UriComponents, UriComponentsBuilder 클래스 사용 방법 #참고 소스 @Override public String getName() { URI uri = UriComponentsBuilder .fromUriString("http://localhost:8080") .path("/api/server/name") .queryParam("name", "jack") .build() .toUri(); RestTemplate restTemplate = new RestTemplate(); ResponseEntity responseEntity = restTemplate.getForEntity(uri, String.class); LOGGER.info("status code : .. 2022. 6. 28.
[Spring] - 스프링 RestTemplate, RestTemplateBuilder 클래스 사용 방법 #스프링 RestTemplate, RestTemplateBuilder 클래스 사용 방법 #RestTemplate이란 -스프링3부터 지원하는 HTTP 통신 기능을 쉽게 사용할 수 있게 설계되어 있는 템플릿입니다. REST API 호출이후 응답을 받을 때까지 기다리는 동기방식으로 처리되며 RESTful 방식을 지키고 있습니다. #RestTemplateBuilder -빈 생성시 사용합니다. #RestTemplate 관련 주요 메소드 메소드 HTTP 설명 getForObject GET GET 형식으로 요청하며 객체로 결과값을 반환받습니다. getForEntity GET GET 형식으로 요청하며 ResponseEntity로 결과를 받환받습니다. postForObject POST POST 형식으로 요청하며 객체로 .. 2022. 6. 28.
[Maven] - 메이븐 프로젝트 pom.xml에 Unknown Error 해결 방법 #메이븐 프로젝트 pom.xml에 Unknown Error 해결 방법 1. pom.xml 에서 maven-jar-plugin.version 태그를 추가해줍니다. 1.8 3.1.1 2022. 6. 26.
[Maven] - 메이븐 'maven'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다. 해결 방법(메이븐 설치 및 환경변수 설정) #메이븐 'maven'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다. 해결 방법(메이븐 설치 및 환경변수 설정) 1. 메이븐 다운로드 사이트 링크입니다. https://maven.apache.org/download.cgi Maven – Download Apache Maven Downloading Apache Maven 3.8.6 Apache Maven 3.8.6 is the latest release and recommended version for all users. The currently selected download mirror is https://dlcdn.apache.org/. If you encounter a problem with this mirro.. 2022. 6. 26.
[Spring] - 스프링 pom.xml Failure to transfer org.apache.maven.plugins:maven-assembly-plugin:pom:2.2-beta-5 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of.. #스프링 Failure to transfer org.apache.maven.plugins:maven-assembly-plugin:pom:2.2-beta-5 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-assembly-plugin:pom:2.2-beta-5 from/to central (htt.. 2022. 6. 26.
[Linux] - 리눅스(Linux) 우분투(Ubuntu) 터미널에서 명령어 파일의 실제 위치를 찾는 방법(which, which -a 명령어) #리눅스(Linux) 우분투(Ubuntu) 터미널에서 명령어 파일의 실제 위치를 찾는 방법(which, which -a 명령어) 1.리눅스에서 which 명령어를 사용하면 명령어 파일의 실제 경로를 찾을수 있습니다. ex) which ls (ls 명령어의 실제 위치를 출력합니다.) -같은 이름의 파일이 여러개 있으면 which -a 옵션을 사용해서 전체 목록을 출력할 수 있습니다. 2022. 6. 25.
728x90
반응형