전체 글 173

이클립스에서 javadoc 에서 생성 방법

이클립스에서 javadoc 생성 방법 프로젝트 선택 후 오른쪽 버튼 export 클릭 javadoc 선택 * 소스 내의 주석에 한글이 있을 경우 다음과 같은 오류 발생 할 수 있음. "error: unmappable character (0x80) for encoding x-windows-949" 해결 방법은 인코딩 설정을 추가 -encoding UTF-8 javadoc.exe 의 사용법 Usage: javadoc [options] [packagenames] [sourcefiles] [@files] where options include: --add-modules (,)* Root modules to resolve in addition to the initial modules, or all modules ..

java 2020.06.06

RestTemplate으로 basic auth 를 통한 rest api 사용

Basic auth를 인증으로 사용하고 있는 rest api에 접근 할 때는 아래와 같이 하면 된다. 하지만 BasicAuthenticationInterceptor가 스프링 5.1.1 부터 Deprecated 되었기 때문에 지양하고 org.springframework.http.HttpHeaders#setBasicAuth 를 사용하도록 한다. [AS-IS] RestTemplate restTemplate = new RestTemplate(); String url = "http://domain:port/test"; restTemplate.getInterceptors().add(new BasicAuthorizationInterceptor("id", "pw")); ResponseEntity response = r..

spring-project 2020.01.19

Spring Security Multiple HttpSecurity(Form Login & Http Login)

하나의 프로젝트에서 폼로그인도 되고 Http Login도 되도록 설정을 하려면 다음과 같이 설정을 변경해 주면 된다. Reference 참조 https://docs.spring.io/spring-security/site/docs/current/reference/htmlsingle/#multiple-httpsecurity Spring Security Reference The authenticator is also responsible for retrieving any required user attributes. This is because the permissions on the attributes may depend on the type of authentication being used. For ex..

spring-project 2020.01.19