반응형
250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- codedeploy
- or some instances in your deployment group are experiencing problems.
- PostgreSQL
- Python
- kubeflow
- chart.js
- COALESCE
- aws
- 도커
- IntelliJ
- codebuild
- AWS CI/CD 구축하기
- bootstrap
- SQL
- Airflow
- Kafka
- docker
- redis
- codepipeline
- codedeploy error
- Flux
- java bigdecimal
- JavaScript
- Jenkins
- node
- aws cicd
- Spring
- chartjs
- Spring Error
- VPN
Archives
- Today
- Total
Small Asteroid Blog
[Spring boot] modelMapper 에러 - required a bean of type 'org.modelmapper.ModelMapper' that could not be found. 본문
백엔드/Spring
[Spring boot] modelMapper 에러 - required a bean of type 'org.modelmapper.ModelMapper' that could not be found.
작은소행성☄️ 2022. 11. 22. 18:42728x90
modelMapper 를 사용하려는데 다음과 같은 에러가 나왔다.
에러 메시지
Parameter 1 of constructor in com.restapi.auth.service.impl.RelativeServiceImpl required a bean of type 'org.modelmapper.ModelMapper' that could not be found.
1개 이상의 자동주입 후보가 있어야 한다는 뜻으로 @Bean을 등록해준다.
@Service
@RequiredArgsConstructor
public class MemberServiceImpl implements MemberService {
private final ModelMapper modelMapper;
}
@Bean 등록
import org.modelmapper.ModelMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class AppConfig {
@Bean
public ModelMapper modelMapper(){
return new ModelMapper();
}
}
728x90
반응형