Overriding beans in Integration tests

后端 未结 7 1879
眼角桃花
眼角桃花 2020-12-23 09:16

For my Spring-Boot app I provide a RestTemplate though a @Configuration file so I can add sensible defaults(ex Timeouts). For my integration tests I would like to mock the R

7条回答
  •  爱一瞬间的悲伤
    2020-12-23 09:44

    Check this answer along with others provided in that thread. It's about overriding bean in Spring Boot 2.X, where this option was disabled by default. It also has some ideas about how to use Bean Definition DSL if you decided to take that path.

提交回复
热议问题