spring-projects-experimental / spring-fu

Configuration DSLs for Spring Boot
Apache License 2.0
1.67k stars 139 forks source link

Activate Autoconfiguration for certain external dependencies #391

Closed BeneStem closed 2 years ago

BeneStem commented 2 years ago

Hey there spring-fu Team,

first of all thank you very much for this great project.

I am using it very successfully in an exploration on how to make DDD projects better with functional design.

But now I started to integrate more infrastructure like actuator, metrics, and such.

Actuator support is not here yet, I found the related issue.

But how about external dependencies like springdocs?

I am trying to activate the swagger-ui but to my knowledge there is no way of activating a lot of @Beans from an external dependency automatically.

Can you elaborate on that? Am I missing sth?

You will find a related issue here https://github.com/springdoc/springdoc-openapi/issues/891#issuecomment-1193109219.

Thank you very much!

sdeleuze commented 2 years ago

Hi, for now there is no way to do it automatically so you will have to register each bean potentially using the autoconfig methods annotated with @Bean like we do in https://github.com/spring-projects-experimental/spring-fu/tree/main/autoconfigure-adapter/src/main/java/org/springframework/boot/autoconfigure.