hello jiniworld

hello jiniworld

  • hello jiniworld (218)
    • Spring (58)
      • Basic (15)
      • Spring Docs (6)
      • Spring Data JPA Tutorial (14)
      • Spring Boot Tutorial (17)
      • Jersey (6)
    • Go (17)
    • Dev (10)
      • Clean Architecture (3)
      • System Design (2)
      • Documents (2)
      • Client (2)
    • Infrastructure (5)
      • Docker (1)
      • Kubernetes (4)
    • DB (19)
      • MySQL (8)
      • MariaDB (9)
      • Oracle (1)
    • Java (52)
      • Basic (14)
      • coding test (27)
      • Effective Java (11)
    • Python (7)
      • Flask (1)
      • Basic (3)
      • Effective Python (1)
      • coding test (2)
    • Front-end (3)
      • Vanilla JS (2)
      • Basic (1)
    • Linux (11)
      • Basic (2)
      • Command-line (9)
    • Web Server (6)
      • CentOS 7 (5)
      • Oracle Linux 8 (1)
    • WAS (3)
    • CentOS 7 (17)
      • Basic (9)
      • Jenkins (8)
    • Etc (10)
      • Windows 10 (3)
      • trash bin (3)
05-13 15:44
  • 전체보기
  • 방명록
  • jini's GitHub
  • demo api
  • chaeking api
RSS 피드
로그인
로그아웃 글쓰기 관리

hello jiniworld

컨텐츠 검색

태그

spring docs https MariaDB Spring springboot effectivejava codility Spring Boot SpringBoot2 hackerrank Spring Boot Tutorial Jersey centos7 jenkins week1 Java Command-Line JAX-RS go MySQL

최근글

댓글

공지사항

  • SSL 인증서 설정하기

아카이브

hello jiniworld(218)

  • Item 1. constructor 대신 static factory method를 사용할 수 없는지 생각하라.

    2019.03.07
  • spring boot 에서 JPA 사용하기 with MySQL

    2019.03.06
Item 1. constructor 대신 static factory method를 사용할 수 없는지 생각하라.

Class로부터 object를 만드는 2가지 방법. ① public constructor ② public static factory method 우리는 보통 public 생성자를 통해 객체를 생성한다. 이 때, 이 객체 생성을 static factory method를 이용하여 생성할 수는 없는지 아래의 장단점을 체크해보고 고려해보도록 하자. 장점1. 생성자와 달리 메서드이기에 이름을 가질 수 있다. 따라서 가독성이 높다. 메서드에는 우리가 이름을 지을 수 있다. 따라서 기능에 대해서 우리가 이름을 지어줄 수 있기에 가독성이 높다. 그리고 동일한 시그니쳐(= 동일한 매개변수들)를 이용해야 할 때, 만약 생성자로 만든다면 어떤 생성자가 어떤 기능을 하는지 헷깔릴 수가 있다. public Car(String ..

2019. 3. 7. 11:26
spring boot 에서 JPA 사용하기 with MySQL

spring data jpa를 이용하여 spring boot 환경에서 간편하게 MySQL을 연동하는 방법을 배워봅시다. pom.xml 에 dependency 추가 db 접속정보를 프로퍼티에 설정 database 관련 config파일 설정 db 조회 1. pom.xml 에 dependency 추가 먼저, mysql db와 jpa를 이용하기 위한 dependencies를 pom.xml에 추가합니다. org.springframework.boot spring-boot-starter-data-jpa mysql mysql-connector-java runtime 2. db 접속정보를 프로퍼티에 설정 그리고, 프로퍼티파일에 db접속정보를 설정합니다. spring: profiles: active: local datas..

2019. 3. 6. 17:49
1 ··· 34 35 36 37
JINIWORLD
© jiniworld. All rights reserved.

티스토리툴바