I want to know when we will moving forward to the new structure of the main class in spring projects, I mean when will see this:
public class DemoApplication {
void main() {
SpringApplication.run(DemoApplication.class);
}
}
instead of this:
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
and if it's stable to use it now, is their any changes in the future???
Comment From: wilkinsona
This isn't supported as it's a preview feature in JDK 21. We may support it in the future but that won't happen until the feature's finalised in the JDK.