spring-projects / spring-projects/spring-boot

DynamicPropertyRegistry Values Not Set After Dev Tools Reload for RestartScope Containers

Open
#41,552 14 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

When using a combination of @RestartScope Test Containers and the DynamicPropertyRegistry registry property values are not set back after Spring Dev Tools reload the project. The issue was partially resolved in https://github.com/spring-projects/spring-boot/issues/35786 but that fix does not appear to resolve the entire issue. I've linked to a small example project demonstrating the issue. See https://github.com/shawnweeks/spring_boot_testcontainers_restartscope_issue

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the small example project linked in the issue and reproduce the Dev Tools reload with @RestartScope Test Containers and DynamicPropertyRegistry. Compare the behavior with the partial fix in issue #35786; done means the registry property values are set again after a reload.

Written by the indexing model from the issue text.

Assessment

Tech stack
devtools, java, spring-boot
Domain
backend, developer-experience, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.