Filter ContextCustomizerFactory implementations that are only necessary at build time #1242
Comments
This is breaking |
@sbrannen can you please give us a status update of what you've tried so that I don't duplicate the effort? |
Everything goes in the direction of being able to swap the |
Indeed, that may be the most robust solution in the end.
I thought about that as well, but the thing is that the context customizers have to be present/instantiated/registered in order for the |
I didn't have a solution in place. Rather, I was investigating/contemplating possible solutions. One thing I was considering was "caching" the calculated |
Let's follow-up on #1262 for the cache key problem. |
Overview
Consider the following use case:
At build time, the processing of
@SpringBootTest
registers the necessary infrastructure to parseSomeConfiguration
. At runtime, this process runs again (because it is part ofSpringBootTestContextBootstrapper
, viaImportsContextCustomizer
).Parsing configuration classes in a native image should not happen as it was done already at build time.
Deliverables
This task is to validate that the right AOT infrastructure is generated with such a test and to prevent it from happening again at runtime.
There might be other
ContextCustomizer
implementations that are running twice and should be handled the same way.The text was updated successfully, but these errors were encountered: