Skip to content

Instantly share code, notes, and snippets.

@geoHeil
Created March 25, 2016 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geoHeil/381ef16a97ff5a1b5ac0 to your computer and use it in GitHub Desktop.
Save geoHeil/381ef16a97ff5a1b5ac0 to your computer and use it in GitHub Desktop.
Could not get @springboot Annotation to work with camel auto discovery
@ComponentScan
@EnableAutoConfiguration
public class RebeatPrototype {
private static final Logger LOGGER = Logger.getLogger(RebeatPrototype.class);
public static void main(String[] args) {
LOGGER.info("INIT CONTEXT");
// CREATE SPRING-CAMEL CONTEXT (PROPERTIES REPLACEMENT, AUTOLOADING COMPONENTS,...)
ConfigurableApplicationContext cAC = SpringApplication.run(RebeatPrototype.class, args);
CamelSpringBootApplicationController cSACC = cAC.getBean(CamelSpringBootApplicationController.class);
// START APPLICATION
LOGGER.info("START MAIN THREAD");
cSACC.blockMainThread();
}
@geoHeil
Copy link
Author

geoHeil commented Mar 25, 2016

I could not get http://camel.apache.org/spring-boot.html Auto-configured Camel context to work and switched to this manual approach. How could I use the Auto Configuration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment