public:computer:spring_tools

Spring Tools |4

  • Install Java JDK
  • Set Environments; PATH, …
// 설치 후 shell에서 자바 버전 확인
$ java -version

// change directory @mac
$ cd /Library/Java/JavaVirtualMachines/

// JAVA_HOME path 설정
// Shell이 bash인 경우 path 설정
$ vi ~/.bash_profile

// 환경 변수 설정 후 jdk 버전 확인
$ java -version

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_311.jdk/Contents/Home

  1. Download jar file
  2. Unpack jar file
  3. Executable Folder; <jar filename folder>/contents/<Release folder>/
  4. Edit SpringToolSuite4.ini file
    • -vm; specify javaw.exe with full path
    • -javaagent; add lonbok.jar with full path
    • ? -Dosgi.requiredJavaVersion; 1.8? 11?
    • -startup
      plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar
      --launcher.library
      plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1200.v20200508-1552
      -product
      org.springframework.boot.ide.branding.sts4
      --launcher.defaultAction
      openFile
      -vm
      C:/..../java-1.8.0-openjdk-1.8.0.212-1/bin/javaw.exe
      -vmargs
      -Dosgi.requiredJavaVersion=1.8
      -Dosgi.dataAreaRequiresExplicitInit=true
      -Xms256m
      -Xmx2048m
      --add-modules=ALL-SYSTEM
      -javaagent:C:\....\lombok.jar
      
  1. Open Workspace
  2. Import Project(Package Explorer)
  3. Select Project Type(Gradle | Maven)
  4. Browse Project Root Directory
  5. Check Imported Packages in Package Explorer
  6. STS4; [Window] → [Show View] → [Project Explorer]
  7. Change Text File Encoding; [Preferences] → [General > Workspace] →
    • Text file encoding; Other: UTF-8
    • New text file line delimiter; Oterh: Unix
  • [Boot Dashboard]
    • select a package & run
  • Extension Pack for Java by Microsoft
  • Spring Boot Tools by Pivotal Spring Boot Extension Pack by Pivotal
  • Command Palette (⌘ + ⇧ + P, Ctrl+Shift+P); spring initializr
    1. Choose One(Add Starters/Create a Gradle Project/Create a Maven Project)
    2. Specify Spring Boot version;
    3. Specify prject language; Java / Kotlin / Groovy
    4. Input Group Id; com.example
    5. Input Artifact Id; demo
    6. Specify packaging type; Jar / War
    7. Specify Java version; 11/ 17 / 8
    8. Search for dependencies;
      • Spring Boot DevTools (*)
      • Spring Web (*)
    9. Choose Directory to make a project
  • public/computer/spring_tools.txt
  • Last modified: 2021/11/21 00:28
  • by alex