My application looks like below. In this configuration my application works (it is bootstrapped with the @ComponentScan).
Unfortunately then /actuator/health does not work. When I remove @ComponentScan then actuator works but my application does not work.
What do I need to configure to make both @ComponentScan and actuator work?
@EnableAutoConfiguration
@SpringBootApplication
@ComponentScan(basePackageClasses = {DistributionApp.class})
public class Main extends SpringBootServletInitializer {
...
}