Created
March 25, 2016 19:43
-
-
Save geoHeil/381ef16a97ff5a1b5ac0 to your computer and use it in GitHub Desktop.
Could not get @springboot Annotation to work with camel auto discovery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?