Post

Spring Project Eclipse에서 intelliJ에 import 하기

spring 프로젝트 intelliJ로 가져오기

Spring Project Eclipse에서 intelliJ에 import 하기

intelliJ Ultimate 2024.3.x

File > New > Project from Existing Sources

Import Project : Eclipse 환경으로 Default 설정

Project Settings

  1. jdk, language Level, output 설정
  2. Module에서 spring 추가 : spring config 파일을 설정
  3. Module 에서 web 추가 : web home, web.xml 파일 설정
  4. library : maven, gradle, lib(WEB-INF/lib) 추가
  5. Dependency 에 Tomcat lib 추가 (Provided)
  6. Artifacts : Web Application : Exploded > From Module 추가

Lombok

File > Settings > Build, Execution, Deployment > compiler > Annotation Processors - ✅ Enable annotation processing

Tomcat

  1. Settings > Build, Execution, Deployment > Application Servers
  2. Tomcat Local
  3. VM Options 수정

intelliJ Community Edition

Project Settings

  1. jdk, language Level, output 설정
  2. Module: Source - Project Home 추가
    • src/main/java
    • src/main/resources
    • src/test/java
    • src/main/properties/local
  3. Paths : Inherit project compile output path
  4. Dependencies : lib, Tomcat 추가 (Provided)

Tomcat 설정

Community Edition Version에서는 Tomcat 실행을 지원하지 않는다. Plug-in 설치를 통해 사용할 수 있다.

  1. Settings > References > Plugins : Marketplaces - Smart Tomcat 설치
  2. Run > Edit Configurations 추가
    • Smart Tomcat - Configuration
    • Tomcat Server > [+] 추가 하여, 이름 / 버전 / Home Path 설정
  3. Catalina base: ~/.SmartTomcat/web/newProject
  4. Deployment Directory: src/main/webapp
  5. Use classpath of module : moduleName
  6. Context path : /
  7. VM Options
  8. Server Port : 8080
  9. Admin Port : 8005
  10. Environment variables
  11. Before Launch : Build

💡 Build 시에 OutofMemory 발생시에

Settings > Build, Execution Deployment > Compiler : Shared build process heap size 를 늘려준다.

This post is licensed under CC BY 4.0 by the author.