์ค๋์ ์คํ๋ง 4๋ฅผ ์ค์นํ๊ณ
๊ฐ๋ฐํ๊ฒฝ์ ์ธํ ํด๋ณด์.
1. ์ฌ์ดํธ ์ ์
Spring Tools 4 is the next generation of Spring tooling
Largely rebuilt from scratch, Spring Tools 4 provides world-class support for developing Spring-based enterprise applications, whether you prefer Eclipse, Visual Studio Code, or Theia IDE.
spring.io
WINDOWS 64-BIT ํด๋ฆญ
2. ๋ค์ด๋ก๋ ํ์ธ ๋ฐ ์์ถ ํด์
ํน์ดํ๊ฒ jar ํ์ผ๋ก ๋ค์ด๋ก๋๊ฐ ๋๋ค.
์์ ์ด ์ํ๋ ํด๋์ ์์ถ์ ํ์ด์ค๋ค.
content.zip ํ์ผ์ ์์ถ์ ํ์ด์ค๋ค.
SpiringToolsSuite4.exe ํด๋ฆญ
3. WorkSpace ํด๋ ์ค์ ๋ฐ STS4 ์คํ
ํ๋ก์ ํธ ํ์ผ์ด ์ ์ฅ๋๋ ์์น
Workspace ์ ํํด์ค๋ค.
Workspace ํด๋ ์ ํ ํ
ํ์ธ์ ๋๋ฅด๋ฉด STS4 ์คํ ์๋ฃ.
4. Spring vs Spring Boot ์ฐจ์ด์ ์๊ธฐ
STS4๋ Spring์ด Spring Boot๋ก ๋ณ๊ฒฝ.
์คํ๋ง ํ๋ ์์ํฌ๋ ๊ธฐ๋ฅ์ด ๋ง์ ๋งํผ ํ๊ฒฝ์ค์ ์ด ๋ณต์กํ ํธ. ์ด๋ฐ ์ด๋ ค์์ ์ํด ๋์จ ๊ฒ์ด Spring Boot
Spring Boot
- ์คํ๋ง ์ค์ ์์ ๋ฐ๋ณต๋๋ ์ฝ๋๋ฅผ ๋นผ๊ณ ๊ฐํธํ๊ฒ ์ด์ฉํ ์ ์๊ฒ ํ์ฅ๋ ๋ฒ์
- ์คํ๋ง ์ค์ ์ ๋ง์ ๋ถ๋ถ์ ์๋ํํ์ฌ ์ฌ์ฉ์๊ฐ ํธํ๊ฒ ์คํ๋ง์ ์ธ ์ ์๋๋ก ๋์
- starter dependency๋ง ์ถ๊ฐํ๋ฉด ๋ฐ๋ก API๋ฅผ ์ ์ํ๊ณ ๋ด์ฅ๋ Tomcat์ผ๋ก ์๋ฒ ์คํ ๊ฐ๋ฅ
5. Spring ํ๋ก์ ํธ ์์ฑํ๊ธฐ
5-1) Name/Type/Packaging/java Version ์ค์
Create new Spring Starter Project ํด๋ฆญ
ํ ์คํธ์ฉ์ด๋ ์ค์ ๋ Name์
demoProject๋ก ์ฌ์ฉํ ์์
Type์ Maven
Packaging์ War๋ก ํด์ค๋ค.
5-2) Spring Boot Version ๋ฐ ํ์ํ ์ค์ ์ ๋ค์ด๋ก๋
JDBC, MyBatis, ์ฌ์ฉํ DB Driver ๋ฑ..
ํ์ํ ๊ฒ๋ค์ ์ ํํ๋ฉด ๋๋ค.
Finish ํด๋ฆญ
'
build ๋๋ ๊ฑธ ๊ธฐ๋ค๋ฆฐ๋ค..
์ด? ์ค๋ฅ๊ฐ ๋ฌ๋ค..
5-3) java SE - 11 ๋ค์ด๋ก๋
java๋ฒ์ ๋ฌธ์ .. ๊ทธ๋ ๋ค๋ฉด ๋ค์ด๋ก๋ํ๋ฌ..
ํด๋ฆญ
https://www.oracle.com/java/technologies/javase-jdk11-downloads.html
Windows x64 Compressed Archive
jdk-11.0.8_windows-x64_bin.zip ํด๋ฆญ
์ฒดํฌ ํ ๋ค์ด๋ก๋ ํด๋ฆญ
์ค๋ผํด ๋ก๊ทธ์ธ..... (ํ)
๋น๋ฐ๋ฒํธ ๊น๋จน์ด์ ์ฐพ.. ๊ณ ....
๋ก๊ทธ์ธ ์ฑ๊ณต,,
๋ค์ด๋ก๋๊ฐ ์ง์ง ์์..
* ์ค์ * jdk๋ oracle jdk ๋ง๊ณ open jdk๋ฅผ ์ฌ์ฉํ์ !!!
์ด์ ๋ ์๋ ํด๋ฆญ
https://recipes4dev.tistory.com/173
์คํJDK ๋ค์ด๋ก๋ ๋ฐ ์ค์น. (OpenJDK Download and Install)
1. ์๋ฐ์ ์ค๋ผํด. ๊ทธ๋ฆฌ๊ณ OpenJDK. "์ฌ ๋ง์ดํฌ๋ก์์คํ ์ฆ(Sun Microsystems)" ์์ ์ ์๋ฐ(Java)๋ GPL ๋ผ์ด์ผ์ค๋ฅผ ๊ฐ์ก๊ธฐ ๋๋ฌธ์ ์๋ฐ ํ๋ก๊ทธ๋จ ๊ฐ๋ฐ ๋ฐ ์ด์ฉ์ ์์ด JDK(Java Development Kit, ์๋ฐ ๊ฐ๋ฐ ๋๊ตฌ)..
recipes4dev.tistory.com
5-4) java > Installed JREs ์ถ๊ฐํ๊ธฐ
Window - Preferences - Java - Installed JREs
Add ํด๋ฆญ
์์์ ๋ค์ด๋ก๋ํ jdk ํด๋ ์์น๋ฅผ ๋ณต์ฌ ํ
JRE home์ ๋ถ์ฌ ๋ฃ์ด์ฃผ๋ฉด ์์์ ์ ๋ ฅ
finish ํด๋ฆญ
์๋ฌ ํด๊ฒฐ
6. Encoding ์ธ์ฝ๋ฉ ์ค์
Window - Preferences - Web - Css Files - Encoding - UTF8
Window - Preferences - Web - HTML Files - Encoding - UTF8
Window - Preferences - Web - JSP Files - Encoding - UTF8
Window - Preferences - General- Workspace- Other - UTF8
7. Server ์ค์
Spring Boot๋ Tomcat์ด ๋ด์ฅ๋์ด์์ด Server ์ค์ ์ ๋ฐ๋ก ํด์ค ํ์๊ฐ ์๋ค.
8. Port ๋ณ๊ฒฝ
Spring Boot๋ ๊ธฐ๋ณธ์ ์ผ๋ก Port๊ฐ 8080์ผ๋ก ๋์ด์๋ค.
application.properties์ ๋ค์ด๊ฐ
server.port = ์ํ๋ ํฌํธ
๋ณ๊ฒฝ ์๋ฃ
9. ์ฐ๊ฒฐ ํ ์คํธ
๊ฐ๋จํ๊ฒ console ์ถ๋ ฅ
'Spring > Spring Boot' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Spring Boot] Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured ์๋ฌ (1) | 2020.09.03 |
---|