• Spring: Please ignore my mocks

    If you are using the core Spring Framework (that is, not Spring Boot), then you may have encountered a problem where Spring doesn’t seem to completely ignore mocked beans in your tests: Perhaps Spring attempts to inject beans into them or run your @PostConstruct lifecycle methods. In this post I present that problem together with… Continue Reading

  • Spring: Bean qualification

    In this post I present how you can control a situation in which there are multiple beans that qualifies for an injection point in Spring. The material here has been tested with Spring Framework 4.3. The problem Let’s first take a look at the problem. Imagine you have this interface: And two different implementations of this. First this: And then this:… Continue Reading