λ°˜μ‘ν˜•


[1] μ„€μΉ˜λͺ©λ‘ : μžλ°”, ν†°μΊ£, maven, 이클립슀...DB..


1) μžλ°”μ„€μΉ˜

  λ³΄μ•„ν•˜λ‹ˆ 1.9 λ²„μ „κΉŒμ§€ λ‚˜μ˜¨κ±°κ°™μ€λ° λ‚˜λŠ” 1.8 버전 μ•„λ¬΄κ±°λ‚˜ μ„€μΉ˜ν•¨.

  http://www.oracle.com/technetwork/java/javase/downloads/index.html


  μ„€μΉ˜ν•˜λŠ”λ²•μ€ 많이 λ‚˜μ˜€λ‹ˆ μ•Œμ•„μ„œ μ„€μΉ˜ν•˜κ³ , 

  ν™˜κ²½λ³€μˆ˜ μ…‹νŒ… κΌ­ ν•˜λ„λ‘(maven μ„€μΉ˜ν•˜κ³  직접 ν”„λ‘œμ νŠΈ λ§Œλ“€λ•Œ ν•΄λ΄μ•Όν•˜λ‹ˆ..)

  μ œμ–΄νŒ\μ‹œμŠ€ν…œ 및 λ³΄μ•ˆ\μ‹œμŠ€ν…œ\κ³ κΈ‰μ‹œμŠ€ν…œμ„€μ •\ν™˜κ²½λ³€μˆ˜ 

   --> μ‹œμŠ€ν…œλ³€μˆ˜μ— JAVA_HOME λ³€μˆ˜ μΆ”κ°€ (이름을 JAVA_HOME, 경둜λ₯Ό μžλ°”jdkμœ„μΉ˜ κΉŒμ§€ ex) c:\~~~\java~~~\jdk~~~)

   --> μ‹œμŠ€ν…œλ³€μˆ˜μ€‘ pathλΌλŠ” λ³€μˆ˜ νŽΈμ§‘λ²„νŠΌ ν΄λ¦­ν•˜μ—¬ JAVA_HOME μΆ”κ°€ (ex. λΈ”라블라~~;%JAVA_HOME%\bin)

   --> cmd λ“€μ–΄κ°€μ„œ javac 쳐보고 μ΄μƒν•˜λ©΄ java μ§€μš°κ³  λ‹€μ‹œ μ„€μΉ˜ν•΄λ³΄λ„λ‘....


2) ν†°μΊ£μ„€μΉ˜(μ›Ήμ–΄ν”Œλ¦¬μΌ€μ΄μ…˜μ„œλ²„)

  μ–΄μŒ λ‚˜λŠ” tomcat 7을 μ„€μΉ˜ν•¨... κ²€μƒ‰ν•˜λ©΄ μ„€μΉ˜ν•˜λŠ”λ²• λ§Žμ΄λ‚˜μ˜΄. λ‹€μš΄λ°›κ³  μ›ν•˜λŠ” 폴더에 λ„£μŒ.

  https://tomcat.apache.org/download-70.cgi 


  β€» μ°Έκ³  : ν†°μΊ£ 버전별 μ„œλΈ”λ¦Ώ μŠ€νŽ™

  http://zetawiki.com/wiki/%ED%86%B0%EC%BA%A3_%EB%B2%84%EC%A0%84%EB%B3%84_%EC%84%9C%EB%B8%94%EB%A6%BF_%EC%8A%A4%ED%8E%99

ν†°μΊ£ 버전Servlet μŠ€νŽ™JSP μŠ€νŽ™μ›Ήμ†ŒμΌ“ μŠ€νŽ™μ΅œμ†Œ Java 버전
9.04.02.4(μ˜ˆμ •)1.2(μ˜ˆμ •)8
8.03.12.31.17
7.03.02.21.16
6.02.52.1-5
5.52.42.0-1.4
4.12.31.2-1.3
3.32.21.1-1.1

  β€» μ•„νŒŒμΉ˜λŠ” μ›Ήμ„œλ²„, 톰캣은 μ›Ήμ–΄ν”Œλ¦¬μΌ€μ΄μ…˜ μ„œλ²„(μ›Ήμ„œλ²„ 포함)

  http://gap85.tistory.com/45



3) maven μ„€μΉ˜

  메이븐이.... μŠ€ν”„λ§ν”„λ ˆμž„μ›Œν¬μ“Έλ•Œ νŽΈλ¦¬ν•˜κ²Œ 폴더 관리할 수 μžˆλ„λ‘ ν•΄μ£ΌλŠ” 그런 λͺ¨λ“ˆμΈκ°€λ΄„

  * κ΄€λ ¨λ‚΄μš© : http://javacan.tistory.com/entry/MavenBasic

  * λ©”이븐 μ„€μΉ˜ : https://maven.apache.org/download.cgi


4) 이클립슀 μ„€μΉ˜ 및 확인

 https://www.eclipse.org/downloads/download.php?file=/oomph/epp/oxygen/R/eclipse-inst-win64.exe κ°€μ„œμ„€μΉ˜..


5) DB

 λ­μŒ....mysql?



[2] ν”„λ‘œμ νŠΈ 싀행전에..


1) 이클립슀 μ„€μ •

  1.ν†°μΊ£ μ„€μ • 

    -> window>properties>server>Runtime Environments κ°€μ„œ Addλ²„νŠΌν΄λ¦­ 

    -> ν•΄λ‹Ή 톰캣버전 클릭 ν›„ next (λ‚˜μ˜κ²½μš°λŠ” 7.0) 

    -> Browses λ²„νŠΌ ν΄λ¦­ν•˜μ—¬ ν†°μΊ£ 폴더 μœ„μΉ˜ 등둝. (ν†°μΊ£ν΄λ”μœ„μΉ˜) 및 Finish


  2.인코딩 μ„€μ •

    -> λ‚˜μ˜κ²½μš°λŠ” UTF-8둜 μ„€μ •...

  

  3.이클립슀 내에 μŠ€ν”„λ§νˆ΄ μ„€μΉ˜

    -> help>eclips marketplace ν΄λ¦­ν•˜μ—¬ sts 검색 ν›„ install

    -> μ„€μΉ˜λλ‚˜λ©΄ 였λ₯Έμͺ½ 상단 +λ²„νŠΌν΄λ¦­ν•˜μ—¬ spring μΆ”κ°€



[3] Maven ν”„λ‘œμ νŠΈ λ§Œλ“€κΈ°


1) 직접 λ§Œλ“€κΈ°

  1. 메이븐 μ„€μΉ˜ν•  폴더 μƒμ„±ν•˜κΈ° (C:\aaa)


  2. cmd둜 aaa 폴더 μ΄λ™ν•˜μ—¬ mvn archetype:generate λͺ…λ Ήμ–΄ μ‹€ν–‰. 그럼 막 λ‹€μš΄λ°›μ•„μ§

     λ¬΄μŠ¨ μž…λ ₯ν•˜λŠ”κ²Œ λ‚˜μ˜€λŠ”λ° 계속 μ—”ν„°μΉ˜λ‹€κ°€ 

     groupId : νŒ¨ν‚€μ§€rootμž…λ ₯(ex. aaa.bbb.ccc), artifactId : νŒ¨ν‚€μ§€ μƒμœ„ 폴더λͺ…(ex. A) 

     μž…λ ₯ ν›„ μ—”ν„°

     --> 이거 μ•ˆλ˜λ©΄, java ν™˜κ²½λ³€μˆ˜ μ„€μ • μ œλŒ€λ‘œ μ•ˆλœκ±΄μ§€ λ“±λ“± 확인 ν•„μš”ν•¨.

  

  3. λ‹€μš΄λ°›κΈ° λλ‚˜λ©΄ src/main 에 resources 폴더 생성 

     (ν›—λ‚  μŠ€ν”„λ§μ—μ„œ νŠΉμ • ν”„λ‘œμ νŠΈ μž‘μ—…μ‹œμ— μ‚¬μš©ν•˜λŠ” xml 파일 λ‹΄λŠ” 폴더인듯....ν΄λž˜μŠ€νŒ¨μŠ€μ— μœ„μΉ˜ν•΄μ•Όν•  xml...properties...)


  3. pom.xml 에 λ‚΄μš©μΆ”κ°€ (μŠ€ν”„λ§ 버전 뭐쓴닀, 인코딩 뭐쓴닀 λ‚΄μš©μΆ”κ°€)

  

  4. 이클립슀 내에 Import 처리

     μ΄ν΄λ¦½μŠ€ ν”„λ‘œμ νŠΈ 리슀트 화면에 였λ₯Έμͺ½ λ²„νŠΌ ν΄λ¦­ν•˜μ—¬ Import ν•˜κΈ°.

     (Maven/Exsisting Maven Project ν΄λ¦­ν•˜μ—¬ import 처리, pom.xml 은 체크꼭!)


  5. μƒμ„±λœ ν”„λ‘œμ νŠΈ 내에 JRE System Library 였λ₯Έμͺ½λ²„νŠΌν΄λ¦­> propertiesκ°€μ„œ java 버전 μ„€μ • λ‹€μ‹œν•˜κΈ° (λ‚˜μ˜κ²½μš°λŠ” 1.8)



2) 이클립슀 λ‚΄μ—μ„œ λ§Œλ“€κΈ°

  1. μ΄ν΄λ¦½μŠ€μ—μ„œ ν”„λ‘œμ νŠΈ λ§Œλ“€λ“―μ΄ λ§Œλ“€λ©΄λ¨. 

     (λ‚˜μ˜κ²½μš°λŠ” legacy project둜 λ§Œλ“€μ—ˆκ³ , λ§Œλ“€λ•Œ groupId, artifactId μž…λ ₯ν•˜λŠ”κ²ƒμ΄ λ‚˜μ˜¬κ²ƒμž„)

  

λ°˜μ‘ν˜•

'개발 > spring' μΉ΄ν…Œκ³ λ¦¬μ˜ λ‹€λ₯Έ κΈ€

νŠΈλžœμž­μ…˜  (0) 2021.11.25
Spring - μŠ€ν”„λ§ MVC 간단 정리  (0) 2021.06.05
Spring - DI (Dependency Injection)  (0) 2021.06.01
Spring - AOP(Aspect-Oriented Programming)  (0) 2021.05.25
IOC/DI, DIμ‘μš©  (0) 2017.11.20

+ Recent posts