Spring Test Configuration Class Not Available After Every Code Change Until Project Rebuild
I have a Spring Boot application where I have a couple application properties that are only needed for integration tests, not for the actual application. I’ve added these properties to a resource file in the integration tests scope and then reference those values from variables in a @TestConfiguration
class that overrides a matching @Configuration
class in the main app. If I build my project and then immediately run the tests, everything works fine. But if I make code changes anywhere within the project, the next time I try to run the tests, I get “cannot find symbol” errors for the variables that are only in the test configuration.