import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; /** * @author * @desc 결과 리턴용 object */ @Getter @AllArgsConstructor(access = AccessLevel.PRIVATE) @Builder(builderMethodName = "responseObjectBuilder") public class ResponseObject { private int resultCode; private Object resultData; private String resultMessage; public static ResponseObjectBu..
Java 7 이후부터 리소스가 닫히도록 보장하는 try-with-resources 문을 도입했다. 이 구문은 try catch finally 보다 선호되어야 한다. Noncompliant Code Example FileReader fr = null; BufferedReader br = null; try { fr = new FileReader(fileName); br = new BufferedReader(fr); return br.readLine(); } catch (...) { } finally { if (br != null) { try { br.close(); } catch(IOException e){...} } if (fr != null ) { try { br.close(); } catch(IOExc..
logback.qos.ch/manual/appenders.html Chapter 4: Appenders Chapter 4: Appenders 和訳 (Japanese translation) There is so much to tell about the Western country in that day that it is hard to know where to start. One thing sets off a hundred others. The problem is to decide which one to tell first. —JOHN STEINBE logback.qos.ch 날짜별로 파일을 보관하고, 동시에 각 로그 파일의 크기를 제한할 수 있다. ${LOG_PATH}/${LOG_FILE_NAME}.%d{..
github.com/brettwooldridge/HikariCP brettwooldridge/HikariCP 光 HikariCP・A solid, high-performance, JDBC connection pool at last. - brettwooldridge/HikariCP github.com Spring Boot 2.0부터 Default JDBC Connetion Pool HikariCP로 변경되었다. github 사이트에서는 zero-overhad 라면서 엄청난 속도의 향상과 신뢰성이 있다고 소개하고 있다. 일단 Spring Boot 2.0부터 Default로 적용되었으니 충분한 검증은 되었을 거라 생각된다. 변화에 맞춰 HikariCP설정 방법을 알아보자. MySQL max_connections..
프로젝트를 설정, pom.xml을 수정한적이 없는데 갑자기 빌드가 안되면서 아래와 같은 에러가 발생한다. Failed to transfer file: http://repo.maven.apache.org/maven2/.pom Return code is: 501 , ReasonPhrase:HTTPS Required. 2020년 1월 15일부로 maven central repository의 http 지원이 중단되서 나타난 증상이다. 단순히 repository 주소를 http에서 https로 변경하면된다. pom.xml central maven repo central maven repo https https://repo.maven.apache.org/maven2
1. pom.xml 에서 packging을 war를 변경하고 tomcat을 provided로 설정한다. war org.springframework.boot spring-boot-starter-tomcat provided 2. SpringBootServletInitializer를 상속받아 코드에서 서블릿을 초기화하는 코드를 추가해야한다. import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; public class ServletInitializer extends SpringBootServletInit..
pom.xml org.mybatis mybatis 3.5.0 org.mybatis mybatis-spring 2.0.0 code import java.util.Properties; import javax.sql.DataSource; import org.apache.ibatis.session.SqlSessionFactory; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.SqlSessionTemplate; import org.mybatis.spring.annotation.MapperScan; import org.springframework.context.annotation.Bean; import org.springfra..
Spring Security의 기본 동작은 표준 웹 애플리케이션을 사용하기에 쉽다. 쿠기 기반 인증 및 세션을 사용한다. 또한 CSRF 토큰을 자동으로 처리한다. 반면에 외부 서비스 또는 SPA/모바일 응용 프로그램과 함께 사용되는 REST API만 빌드하는 경우에는 전체 세션이 필요하지 않을 수 있다. 여기에 디지털 서명 토큰인 JWT(JSON Web Token)가 있다. 필요한 모든 정보를 토큰에 저장할 수 있으므로 서버가 세션이 없을 수 있다. 서버가 사용자에게 권한을 부여할 수 있도록 모든 HTTP 요청에 JWT를 첨부해야 한다. 토큰을 보내는 방법에 대한 몇 가지 옵션이 있다. 예를 들어 URL 매개 변수로 또는 Bearer 스키마를 사용하는 HTTP 인증 헤더를 사용한다. Authorizati..
public static void main(String[] args) { List studentList = new ArrayList(); studentList.add(new Student("Pea", 20)); studentList.add(new Student("Ni", 35)); studentList.add(new Student("Pang", 30)); studentList.add(new Student("Tum", 25)); studentList.add(new Student("Sombut", 22)); Student student = Collections.max(studentList, Comparator.comparing(s -> s.getAge())); System.out.println("The ol..
- 개발환경
- 리눅스 명령어
- Eclipse
- 정렬 알고리즘
- Linux 명령어
- 성능분석
- 회고
- 제주도 여행
- 소프트웨어공학
- 자바스크립트
- Tomcat
- 오라클
- 리액트
- 이직
- 프로그래머스
- effective java
- 제주도 3박4일 일정
- 자바
- Collection
- Java
- sort algorithm
- spring
- javascript
- 경력관리
- 오라클 내장 함수
- SQL
- React
- 리액트 16
- Maven
- 프로그래머
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |