spring-framework
                                
                                
                                
                                    spring-framework copied to clipboard
                            
                            
                            
                        Prepend existing prefix to new feature name prefix in GenerationContext.withName()
As discussed in https://github.com/spring-projects/spring-framework/issues/28928#issuecomment-1209411867, we should change the semantics of GenerationContext.withName(String) so that an existing "feature name prefix" is not lost.
Specifically, we should prepend any existing prefix to a new provided prefix to ensure that there are no clashes with generated names.
This change may also be helpful in implementing #28204.
As mentioned by @snicoll, "the counter in DefaultGenerationContext [may no longer] need to be transmitted from one context to another."