Spring

Spring: Avoid Circular Dependency error of your @Component(s)
| |

Spring: Avoid Circular Dependency error of your @Component(s)

A case-study using a Custom implementation of the “weird” UsernamePasswordAuthenticationFilter, as @Component. This is actually the case when an auto-created bean (e.g.: an AuthenticationManager instance in a @Configuration annotated class) is required in a @Component annotated class (e.g.: a custom filter extending the UsernamePasswordAuthenticationFilter filter), and then, the bean of the @Component custom filter class is required in the @Configuration class.

No other place to go for your properties and values in Spring
| |

No other place to go for your properties and values in Spring

Spring Boot: @Value, @ConfigurationProperties, Environment API, and other, not-that-easy to be distinguished goodies.

Do you know @Value annotation in Spring/Spring Boot framework? Well, maybe. However, this post aims to be your one-stop shop, when you are wrangling with the mess of externally defined values, for properties and messages. And not only for your bean-managed classes.