Open
Description
I have a really simple spring application that's misconfigured:
@SpringBootApplication()
public class SimpleApplication implements CommandLineRunner {
public static void main(String[] args) {
var ctx = SpringApplication.run(SimpleApplication.class, args);
System.exit(SpringApplication.exit(ctx));
}
public static class MyObject {}
//Oops - No bean provided!!!
@Autowired MyObject myObject;
@Override public void run(String... args) { }
}
I get the following error (in intellij):
...
Consider defining a bean of type 'test.app.SimpleApplication$MyObject' in your configuration.
Process finished with exit code 1
Which is what I'd expect.
If I add the spring-boot-devtools
dependency in maven:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
Then I get the following:
...
Consider defining a bean of type 'test.app.SimpleApplication$MyObject' in your configuration.
Process finished with exit code 0
It seems that adding this package causes spring boot to have the wrong return codes.