Parameter 1 of method dataSource in org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$ ~
어떤게 데이터베이스가 진짜인지 헷갈려요.
1. 에러로그

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
**
APPLICATION FAILED TO START
**
Description:
Parameter 1 of method dataSource in org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari required a single bean, but 2 were found:
jdbcConnectionDetailsFor49c12c36adbc_projectsMysql1: defined in unknown location
jdbcConnectionDetailsForProjectsMysql1: defined in unknown location
This may be due to missing parameter name information
Action:
Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed
Ensure that your compiler is configured to use the '-parameters' flag.
You may need to update both your build tool settings as well as your IDE.
(See https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#parameter-name-retention)
도커로 mysql 이미지를 풀 받아서 사용하는 팀원이 마주친 오류이다. mysql 이 두개가 실행되어 있어서 스프링앱이 어떤 mysql server 와 연결해야 할지 모르겠다는 뜻이다.
인텔리제이나 도커데스크탑을 사용해서 mysql 이 두개 실행되어 있는지 확인해보자.
This post is licensed under
CC BY 4.0
by the author.