강의

멘토링

커뮤니티

인프런 커뮤니티 질문&답변

namuk2002님의 프로필 이미지
namuk2002

작성한 질문수

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

Spring Cloud Gateway의 소개

spring boot 2.3 버전은 없어서 2.4버전으로 강의 실습을 진행하는데 문의

작성

·

1.3K

0

안녕하세요. 강사님 먼저 유익한 강의에 대해 감사드립니다.

 

강좌에서 spring boot 버전 2.3.8로 진행되고 있는데,

저는 이클립스 환경의 spring boot 버전 2.4.11부터 있어서 2.4.11버전으로 강좌 실습을 진행해도 괜찮을지요??

강좌에서 최하위(old) 버전을 이용해 실습되어 버전 호환에 우려하고 있었습니다. ㅎㅎ

관련하여 답변 부탁드리겠습니다.

 

 

답변 2

0

Dowon Lee님의 프로필 이미지
Dowon Lee
지식공유자

안녕하세요, 이도원입니다.

보내주신 이미지의 1번째 라인의 오류는, 이미지 상으로는 확인이 어렵네요. 왼쪽 빨간색 포인트에 마우스를 이동시켜 보면, 오류가 나올 것 같습니다. 확인해 보시기 바랍니다. 그리고 터미널에 출력된 로그 메시지는 정상적으로 빌드 된 것 같습니다. 우선, 이 상태로 실행해 보시기 바랍니다. 

그리고, 제가 올려드린 pom.xml 파일은 2.3.10.RELEASE 버전 입니다. zuul-service 예제는 이전 gateway 방식인 netflix oss zuul을 테스트해 보기 위한 샘플입니다. 해당 사항을 확인 후, 이후 수업에서는 사용하지 않습니다. 참고하시기 바랍니다.

감사합니다. 

namuk2002님의 프로필 이미지
namuk2002
질문자

앗 친절하게 알려주셔서 감사드립니다.

 

주신 pom.xml 파일 컴파일 잘 된것 같습니다.

그럼, 2.3.10.RELEASE 버전용 pom.xml 컴파일된 프로젝트는 수업과 연관이 없다는 건가요?..

제가 헷갈려서 그런데 주신 pom.xml 컴파일해도 수업과 무방하면,,, 이클립스 환경에서 실습을 할수가 없는 것인지요?...

주신 pom.xml 에서 spring-cloud-starter-netflix-zuul 포함되어있는데,, 제가 이해가 부족하여 상세한 설명 부탁드리겠습니다. ㅠㅠ

<dependency>

            <groupId>org.springframework.cloud</groupId>

            <artifactId>spring-cloud-starter-netflix-zuul</artifactId>

</dependency>

0

Dowon Lee님의 프로필 이미지
Dowon Lee
지식공유자

안녕하세요, 이도원입니다. 

spring boot 2.4.x 버전으로 zuul 프로젝트를 실행할 수 없습니다. 이클립스에서 지원되지 않더라도, 아래 pom.xml 파일을 사용하여, 터미널에서 직접 Maven 빌드를 해 보시기 바랍니다. 

mvn clean compile package 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.10.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>zuul-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>zuul-service</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
<spring-cloud.version>Hoxton.SR9</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

</project>

감사합니다.

namuk2002님의 프로필 이미지
namuk2002
질문자

안녕하세요 강사님,

먼저, 2.4.11버전으로 maven 프로젝트를 생성하였고,

 

 

주신 pom.xml 복사해서 붙여넣기 해서 mvn 으로 빌드하였습니다.

빌드가 잘 되었는지 터미널창에 확인부탁드리며, 상단에 1라인에서 왜 오류가 납니다. 원인이 뭔지 알수 있을까요? (이대로 컴파일을 하면되는지 확인부탁드려요 ㅎㅎ;;)

그리고,, 주신 pom.xml은 어떤 버전인지 또한 어떻게 제가 만들수 있는지 알수있을까요?

 

 

namuk2002님의 프로필 이미지
namuk2002

작성한 질문수

질문하기