카테고리 없음

WAS 만들기(1) - spring mvc로 hello world 띄우기(환경변수, 이클립스, 스프링, 톰캣)

숲별 2023. 11. 22. 13:13
728x90

WAS란.. 부터 시작해야겠지.

https://lastviolet05.tistory.com/412

 

Apache와 Tomcat의 차이

1. 소프트웨어 단체 이름2. 1의 제단에서 후원하는 오픈소스 프로젝트 커뮤니티에서 만든 http 웹서버. 1. WAS(Web Application Server)의 일종.2. 카탈리나(catalina) 컨테이너, 자스퍼(jasper) 엔진, 코요테(coyot

lastviolet05.tistory.com

면접준비하면서 만날 WAS랑 웹서버의 차이에 대한 답변을 외웠지만

사실 외운 거고 제대로 이해는 못했는데 위에 글을 읽으니까 좀 와닿았다.

위 글이 잘 작성된 글이어서인지, 내가 이제 이해할 배경지식이 좀 쌓여서인지는 모르겠다.

아직 한참 더 쌓아야하지만 그래도 쌓여가는 기분이라 좋구만!

 

 

전에는 인텔리제이(IDE)에서 Springboot(프레임워크)로 JPA(ORM)써서 mySQL(DB)을 사용하고 Gradle로 빌드했었는데

한 번 Eclipse에서 Spring으로 mybatis써서 Oracle을 사용하고 maven으로 빌드를 해보고 싶었다.

 

흔히들 위아래 차이를 각각 비교하는 글들이 많은데 사실 안 써보니 그리 와닿지가 않아서 사용해보려고 한다.

 

환경변수 설정

https://minstar0410.tistory.com/3

 

이클립스 설치

 

 

스프링으로 게시판만들기

https://velog.io/@ansalstmd/Spring-%EC%9B%B9-%EC%82%AC%EC%9D%B4%ED%8A%B8-%EB%A7%8C%EB%93%A4%EC%96%B4%EB%B3%B4%EA%B8%B0feat.-%EC%8A%A4%ED%94%84%EB%A7%81-MVC-%ED%95%98%EB%A3%A8%EB%A7%8C%EC%97%90-%EB%B0%B0%EC%9A%B0%EA%B8%B0

 

01. Spring 웹 사이트 만들어보기!(feat. 스프링 MVC 하루만에 배우기)

1. spring 설치! 이클립스와 tomcat은 설치완료하기! ![](https://images.velog.io/images/ansalstmd/post/a79f6e3f-0ac4-480e

velog.io

 

마켓에서 스프링 설치부터 막힘..ㅎㅎ

 

더보기

Cannot complete the install because one or more required items could not be found.
  Software being installed: Spring IDE Spring Data Support 3.9.22.202204280911-RELEASE (org.springframework.ide.eclipse.data.feature.feature.group 3.9.22.202204280911-RELEASE)

  Missing requirement: Spring IDE Configuration Graphical Editing 3.9.22.202204280911-RELEASE (org.springframework.ide.eclipse.config.graph 3.9.22.202204280911-RELEASE) requires 'osgi.bundle; org.eclipse.mylyn.commons.ui [3.7.0,4.0.0)' but it could not be found
  Cannot satisfy dependency:

    From: Spring IDE Spring Data Support 3.9.22.202204280911-RELEASE (org.springframework.ide.eclipse.data.feature.feature.group 3.9.22.202204280911-RELEASE)
    To: org.eclipse.equinox.p2.iu; org.springframework.ide.eclipse.feature.feature.group 0.0.0
  Cannot satisfy dependency:

    From: Spring IDE Core (required) 3.9.22.202204280911-RELEASE (org.springframework.ide.eclipse.feature.feature.group 3.9.22.202204280911-RELEASE)
    To: org.eclipse.equinox.p2.iu; org.springframework.ide.eclipse.config.graph [3.9.22.202204280911-RELEASE,3.9.22.202204280911-RELEASE]

찾아보니 mylyn설치가 필요한 것 같았다.

 

 

 

https://wildwolf.tistory.com/entry/%EC%8A%A4%ED%94%84%EB%A7%81-%EB%8B%A4%EC%9A%B4%EB%B0%9B%EA%B3%A0-%EC%84%A4%EC%A0%95%ED%95%98%EA%B8%B0

 

윗글의 제일 아래쪽에서 제시하는 2가지 방법으로 

1. 첫번째방법

https://www.eclipse.org/mylyn/downloads/

 

Mylyn Downloads | The Eclipse Foundation

The Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 415 open source projects, including runtimes, tools and frameworks.

eclipse.dev

 

2. 두번째

https://www.eclipse.org/forums/index.php/t/1109097/

 

Eclipse Community Forums: Newcomers » Cannot install Spring Tools 3 Add-On for Spring Tools 4 from Marketplace | The Eclipse Fo

The Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 350 open source projects, including runtimes, tools and frameworks.

www.eclipse.org

여기 한국어 번역해서보니까 스프링켜고  Help->> 인스톨뉴 소프트웨어-->> 검색창에 

 https://download.eclipse.org/releases/2021-09

이거치고나서 나오는거다 인스톨한다.

 

 

2번은 너무 불필요하게 많은 설치가 일어날 것 같아서 1번 방법을 찾아봤다.

 

1번은 mylyn에서 zip파일 받고 압축 푼 뒤에

이클립스에서 help - install new software에서 add해서 파일 경로 지정해주고 수동설치하면된다.

수동설치방법은 아래 블로그 참고

https://damduck01.com/672

 

최신 버전의 이클립스 Photon과 레드마인을 mylyn을 이용하여 연결하기

요즘 대기업에 파견을 나가서 프로젝트를 하는데 역시나 보안이라는 이름으로 협업을 위한 도구들을 사용하는데 제약이 많네요. 이메일도 못 쓰고 메신저도 못 쓰고.. --; 외부 메일이나 메신저

damduck01.com

 

이번엔 에러없이 설치된 것 같은데 wizard에 spring이 안뜬다..

삭제하고 다시 설치도 해보고 컴퓨터를 껐다가도 켜보고 했는데

https://hippalus.tistory.com/562

 

Eclips DI를 위한 spring 플러그인 설치 오류 해결

java di를 위한 spring 플러그인 설치를 하기위해 이클립스 메뉴의 help > eclips marketplace를 눌러 search에 spring을 입력해본다. 그리고 boot 플러그인이 아닌 Spring Tools 3 Add-On for Spring Tools 4 3.9.22.RELEASE를

hippalus.tistory.com

위랑 같은 현상인가 싶어서

뜰 때마다 trust하겠다 했다가 그냥 always 체크하고 trust 해주니까 뜬다..

 

 

이번엔 Spring Legacy Project 선택 후 Spring MVC Project가 없다..ㅎㅎㅎㅎㅎ

https://wecanit.tistory.com/91

 

Spring Legacy Project Spring MVC Project 없음 현상

Spring 프레임워크 세팅을 하면서 마지막으로 프로젝트를 생성하는데 Spring Legacy Project 내에 Spring MVC Project 없음 현상으로 인해 프로젝트를 생성하지 못하는 문제가 발생하였습니다. 그러다가 검

wecanit.tistory.com

https://velog.io/@gongkeo/spring-mvc-project-%EC%97%86%EC%9D%8C-%EC%98%A4%EB%A5%98

 

spring mvc project 없음 오류

Spring Boot 스터디를 위해 STS를 설치했는데 Spring Legacy Project 항목이 없거나 Spring MVC Project 항목이 없어서 대략 하루를 해결 방법 찾는 데에 썼다. 기존의 인터넷에 나와 있는 방법을 다 썼는데도 안

velog.io

https://rachel0115.tistory.com/entry/eclipse-Spring-Legacy-Project-MVC-project-%EC%83%9D%EC%84%B1%ED%95%98%EB%8A%94-%EB%B2%95

 

[eclipse] Spring Legacy Project - MVC project 생성하는 법

실행환경 - window 10 최신 개발 환경은 legacy project를 생성하기에 불친절한 부분이 있다. 필자도 Spring legacy project를 생성하기 위해 여러 방법을 시도하였는데, 그 과정에 대해 공유하고자 한다. 개

rachel0115.tistory.com

 

위의 마지막 글따라서 그냥 jdk버전이랑 이클립스 버전을 낮추기로..ㅎ

 

 

 

1. 이클립스 삭제 후 재설치 시 발생하는 에러  - ERROR: org.eclipse.equinox.p2.engine code=4 An error occurred during the org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.   내 문서의 .eclipse, .m2, .p2 폴더 삭제

https://wky.kr/59

 

이클립스 설치 에러들(ERROR: org.eclipse.equinox.p2.engine code=4 An error occurred during the org.eclipse.equinox.inter

1. 이클립스 삭제 후 재설치 시 발생하는 에러 - ERROR: org.eclipse.equinox.p2.engine code=4 An error occurred during the org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase. 내 문서의 .eclipse, .m2, .p2 폴더 삭제 2. 프로

wky.kr

 

이클립스 이전 버전은 setup파일이 아니라 압축파일로 다운 받는 형식이었다.

이전 버전으로 깔고 jdk도 11로 맞췄으나 플러그인 설치 오류가 계속 되서 그냥 sts(spring tool suite)로...ㅎ

원래 이클립스 버전에 따라서 플러그인에러가 워낙 많이 나는 것 같았다.

돌고 돌아~

 

https://www.snugarchive.com/blog/sts-setup/

 

STS 다운로드 및 환경 설정하기(STS 3, STS 4)

스프링/스프링 부트 웹 프로젝트 준비하기 (2) IDE

www.snugarchive.com

 

sts로 spring mvc프로젝트 만들어주고

https://velog.io/@topqr123q/spring-boot-%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-%ED%8C%A8%EC%BA%90%EC%A7%80%EB%AA%85-%EC%96%B4%EB%96%BB%EA%B2%8C-%EC%9E%91%EC%84%B1%ED%95%B4%EC%9A%94

 

spring boot 프로젝트 패캐지명 어떻게 작성해요?

스프링 부트 패키지명 작성법을 알아보자

velog.io

 

 

이클립스로 열어줬다..

21년 이클립스가 오래된 버전이라며 불평하는 창을 띄웠지만 드디어 스프링mvc프로젝트 생성 성공..ㅎ

 

톰캣 서버연결

https://alpreah.tistory.com/73

 

[Spring] JSP 개발 환경을 구축하자 - 3

STS를 설치를 하게 되면 기본 내장이 되어 있는 서버(Pivotal tc Server Developer Edition v4.0)가 잇습니다.필자는 해당하는 서버보다는 아파치 톰켓으로 개발을 많이 해 선호해 아파치 톰켓 개발환경을 설

alpreah.tistory.com

 

web.xml에 빨간줄이 생겼다.

https://stackoverflow.com/questions/3219639/cvc-id-3-error-in-web-xml

 

cvc-id.3 error in web.xml

I'm getting this error message while editing web.xml file in eclipse for SpringMVC web-app: cvc-id.3: A field of identity constraint 'web-app-servlet-name-uniqueness' matched element 'web...

stackoverflow.com

 

개발 중 쓸 로그라 debug로 바꾸려고 log4j.xml파일에 들어갔더니 또 빨간줄이..

 

log4j.xml 파일에서

 

log4j.dtd의 경로를 모두 적어준다.

http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd

 

수정 전>

<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">


수정 후>
<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">

출처 : https://withthisclue.tistory.com/entry/Spring-log4jxml-%EC%97%90%EB%9F%AC-Cannot-find-DTD-log4jdtd-%EC%A7%80%EC%A0%95%EB%90%9C-%ED%8C%8C%EC%9D%BC%EC%9D%84-%EC%B0%BE%EC%9D%84-%EC%88%98-%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4

 

[Spring] log4j.xml 에러 - Cannot find DTD, log4j.dtd 지정된 파일을 찾을 수 없습니다.

문제 log4j.xml 에서 예외가 발생했다. 서버 실행은 되고, console 로그도 보이나, 서버 로그 파일이 생성되지 않았다. Cannot find DTD log4j.dtd 지정된 파일을 찾을 수 없습니다. 빨간 x 표시에 마우스를 올

withthisclue.tistory.com

 

 

 

https://min-it.tistory.com/4

 

[03] 스프링 프로젝트 생성 - hello wolrd 출력하기

안녕하세요. MIN-IT입니다. 오늘은 스프링 프로젝트를 생성하여 hello world를 출력해보는 시간을 가지겠습니다. 퍼가실 때 댓글을 남겨주시면 감사하겠습니다. http://min-it.tistory.com *스프링 프로젝트

min-it.tistory.com

 

많이 보고 싶었어 hello world!!

 

이제 절반쯤 왔나..?!

ㄱㄱㄱㄱㄱㄱㄱ!!