Я пытаюсь создать проект с микросервисами, но я получаю ошибку «переменная x, не инициализированная в конструкторе по умолчанию» при попытке использовать аннотацию @requiredargsconstructor из Ломбока. Единственные решения, найденные в Интернете, - это проверить «Получение процессоров из Project ClassPath» (см. Изображение ниже), но это не решило для меня.
4.0.0
com.ku.survey
survey
1.0-SNAPSHOT
pom
21
3.2.5
1.5.5.Final
42.7.2
3.13.0
full
org.springframework.boot
spring-boot-dependencies
${spring-boot.version}
pom
import
org.mapstruct
mapstruct
${mapstruct.version}
org.mapstruct
mapstruct-processor
${mapstruct.version}
org.postgresql
postgresql
${postgresql.version}
org.apache.maven.plugins
maven-compiler-plugin
${maven-compiler-plugin.version}
${java.version}
${java.version}
org.mapstruct
mapstruct-processor
${mapstruct.version}
user
survey-template
experiment
< /code>
и POM для пользовательского микросервиса: < /p>
4.0.0
com.ku.survey
survey
1.0-SNAPSHOT
user
Survey User Microservice
21
org.springframework.boot
spring-boot-starter
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-data-jpa
org.springframework.boot
spring-boot-starter-jdbc
org.postgresql
postgresql
runtime
org.flywaydb
flyway-core
org.mapstruct
mapstruct
org.mapstruct
mapstruct-processor
provided
org.projectlombok
lombok
provided
org.springframework.boot
spring-boot-starter-test
test
src/main/resources
**/*
< /code>
У кого -нибудь есть советы? Я уже давно застрял.@RequiredArgsConstructor
@Service
public class UserWebServiceImpl implements UserWebService {
private final UserMapper userMapper;
private final UserPortInServiceImpl createUserPortInService;
@Override
public void createAccount(CreateUserRequestDto createUserRequestDto) {
//validation service for the input
createUserPortInService.createUser(
userMapper.toCreateUserRequest(createUserRequestDto));
}
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... onstructor