전체 글

전체 글

    [SpringBoot] 구동 속도 향상 시키기

    [SpringBoot] 구동 속도 향상 시키기

    최근의 IntelliJ 버전의 경우 프로젝트를 구동시키면 Gradle로 실행 시키는 것이 기본적으로 세팅되어 있다. 이렇게 실행했을 때, 실행속도는 굉장히 느림을 확인할 수 있다. 하지만 아래와 같이 설정을 바꿔주면 java로 실행을 하게 되는데 이렇게하면 실행이 빨라진다. Preferences -> Build, Execution, Deployment -> Build Tools-> Gradle IntelliJ Help > Edit Custom VM Options... IntelliJ IDEA.app.vmoptions 파일 내 메모리 사이즈 높이기 -Xms1024m -Xmx4096m

    [IntelliJ] IntelliJ Lombok 설치 및 설정

    [IntelliJ] IntelliJ Lombok 설치 및 설정

    ▶ 1. maven - pom.xml org.projectlombok lombok 1.18.12 provided ▶ 2. gradle // https://mvnrepository.com/artifact/org.projectlombok/lombok provided group: 'org.projectlombok', name: 'lombok', version: '1.18.12'

    [IntelliJ] Code Style(Google Style) 적용하기

    [IntelliJ] Code Style(Google Style) 적용하기

    https://github.com/google/styleguide 에서 intellij-java-google-style.xml를 다운로드 xml파일 적용 후 탭, 들여쓰기, 연속 들여쓰기를 448로 맞추자

    [Error][SpringBoot] Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

    com.mysql.jdbc.Driver가 옛날 버전이기 때문에 com.mysql.cj.jdbc.Driver로 바꿔달라는 내용 application.properties에서 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

    IntelliJ(인텔리제이) Spring Boot DevTools 적용하기(Auto reload)

    IntelliJ(인텔리제이) Spring Boot DevTools 적용하기(Auto reload)

    Spring Boot DevTools는 소스 변경이 발생할 때마다 빠르게 자동 빌드해줘서 바로바로 반영 결과를 확인할 수 있도록 도와주는 유용한 툴입니다. STS에서는 Dependency만 추가하면 잘 동작하던 DevTools가 인텔리제이 (IntelliJ)에서는 최초 약간의 설정을 해줘야 정상 동작을 합니다. 1. 의존성(Dependency) 추가 먼저 Spring Boot DevTools의 의존성을 추가를 해야 합니다. Gradle 프로젝트는 build.gradle 파일에 아래와 같이 dependecies 아래 developmentOnly 'org.springframework.boot:spring-boot-devtools' 의존성을 추가한다 dependencies { developmentOnly 'o..

    [Error][SpringBoot] Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

    Spring Boot 초기 프로젝트를 Initializr를 통해서 생성 한 뒤 최초 실행 할 경우 다음과 같은 오류가 발생하면서 정상적으로 실행이 되지 않을 경우. *************************** APPLICATION FAILED TO START *************************** Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class Action: Consider the following: If you wan..

    [Error][Git] src refspec main does not match any

    깃에 올릴 때 명령어가 꼬이면 발생하는 에러인 것 같음 원인 : 깃허브에서 pull 없이 push 할 경우 기존 내용 삭제 문제가 생길 수 있기 때문이라고 함 .git을 삭제하고 다시 clone 받아서 하니까 잘된다

    네이밍 컨벤션 ( Naming Convention ) in Java

    패키지 - 소문자 클래스 - Camel Case(첫 글자 대문자) 메소드명 : 동사로 시장 다른타입으로 변환하는 메소드 : 전치사로 시작할 수 있음(toString()) 상수 : 대문자로 작성하며 합성어로 _로 구분 임시변수외에는 1글자 변수명 금지 이해하기 쉬운 변수명 작성 import java.util.*로 하면 성능에 영향을 줄 수 있어서 필요한 것만 가져오는걸 추천 상수를 변수보다 먼저 선언하고, 동일 속성은 그룹화 한다 변수 선어문은 한 문장에서 하나의 변수만을 다룬다(주석때문에) 1개의 탭 = 4개의 스페이스와 같도록 에디터 설정 클래스 메소드 제어문 등의 block이 생길 때마다 1단계 들여쓰기