spring-io / initializr

A quickstart generator for Spring projects
https://start.spring.io
Apache License 2.0
3.45k stars 1.74k forks source link

Better ordering infrastructure for lambda-based customizers #821

Open snicoll opened 5 years ago

snicoll commented 5 years ago

Adding a default order for the customizer makes sure that we have a deterministic and more sensible default (0). The problem is that it trumps any attempt to use @Order and it's not super obvious.

It took me a bit to figure out what was going with this test.

If we want to set an order (which is why we did this in the first place), we can't nicely write a lambda.

snicoll commented 5 years ago

@philwebb suggested to use a custom OrderComparator or to try to set @Ordered(0) on the customizer interface