inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

[섹션10] 빈 스코프 - request 예제 만들기 : 콘솔창에서 tomcat 포트번호 안보입니다 어떻게 해야할까요

47

문주영

작성한 질문수 10

0

package hello.core;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class CoreApplication {

	public static void main(String[] args) {
		SpringApplication.run(CoreApplication.class, args);
	}

}

build.gradle에 web 도 추가해줬고, 외부라이브러리에 들어온것도 확인했습니다.
정상실행은 되는데 콘솔창에 tomcat 포트 번호가 왜 안나올까요?

 

2025-03-11T20:28:43.171+09:00 INFO 31192 --- [ main] hello.core.CoreApplication : Starting CoreApplication using Java 17.0.12 with PID 31192 (C:\Users\user\Desktop\study\core\build\classes\java\main started by user in C:\Users\user\Desktop\study\core)

2025-03-11T20:28:43.179+09:00 INFO 31192 --- [ main] hello.core.CoreApplication : No active profile set, falling back to 1 default profile: "default"

2025-03-11T20:28:44.874+09:00 WARN 31192 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name 'memoryMemberRepository' defined in class path resource [hello/core/AutoAppConfig.class]: Cannot register bean definition [Root bean: class=null; scope=; abstract=false; lazyInit=null; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; fallback=false; factoryBeanName=autoAppConfig; factoryMethodName=memberRepository; initMethodNames=null; destroyMethodNames=[(inferred)]; defined in class path resource [hello/core/AutoAppConfig.class]] for bean 'memoryMemberRepository' since there is already [Generic bean: class=hello.core.member.MemoryMemberRepository; scope=singleton; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; fallback=false; factoryBeanName=null; factoryMethodName=null; initMethodNames=null; destroyMethodNames=null; defined in file [C:\Users\user\Desktop\study\core\build\classes\java\main\hello\core\member\MemoryMemberRepository.class]] bound.

2025-03-11T20:28:44.898+09:00 INFO 31192 --- [ main] .s.b.a.l.ConditionEvaluationReportLogger :

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.

2025-03-11T20:28:44.986+09:00 ERROR 31192 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :

***************************

APPLICATION FAILED TO START

***************************

Description:

The bean 'memoryMemberRepository', defined in class path resource [hello/core/AutoAppConfig.class], could not be registered. A bean with that name has already been defined in file [C:\Users\user\Desktop\study\core\build\classes\java\main\hello\core\member\MemoryMemberRepository.class] and overriding is disabled.

Action:

Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true

답변 1

0

문주영

같은 문제 있으신 분들 아래 질문자님 글 보시면 됩니다
선생님이 답변 남겨주셔서 해결됐습니다!!

https://www.inflearn.com/community/questions/1206117/%ED%8F%AC%ED%8A%B8%EB%B2%88%ED%98%B8%EA%B0%80-%EC%83%9D%EC%84%B1%EC%9D%B4%EC%95%88%EB%90%98%EC%9A%94?srsltid=AfmBOoqflSGZl3vrwaPW0ZFgqi0C4XyLNbjHnqYqhWc3u1EhAHcp_DLW

백준 서비스 종료

9

751

1

강의 추천해주세요

2

15

1

[업데이트] 파이썬 패키지 부분에서 안되어서 강의 진행 불가

2

59

3

완전히 똑같이 따라해도 exe파일이 안만들어져서 실행이 안됩니다.

1

51

3