Код: Выделить всё
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 1 of constructor in com.package.MyClass required a single bean, but 2 were found:
- MyClass: defined in URL [jar:file:/var/lib/jenkins/workspace/.../com/package/MyClass.class]
- fop.factory.pool-com.package.MyClass: 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~ILparameter-name-retention]
Код: Выделить всё
@Component
@Primary
@ConfigurationProperties(prefix = "fop.factory.pool")
public class MyClass {
...
}
< /code>
Из My - Limited - Понимание, @primary помечает MyClass как более высокий приоритет для того, чтобы быть введенным в качестве боба, а @ConfigurationProperties определяет префикс для доступа к MyClass (например, через файлы Application.Properties и тому подобное?). Что потеряно для меня, так это то, как @ConfigurationProperties
Код: Выделить всё
@ConfigurationProperties
Подробнее здесь: https://stackoverflow.com/questions/795 ... g-boot-3-4