-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add the spring-boot-cxf-jaxrs to application #1
Comments
I just tried to reproduce the above problem but I am unable. I have tested with Spring Boot 1.2.0 (the version I originally developed with), 1.2.5 (latest released version) and 1.3.0.BUILD-SNAPSHOT (latest code). What version of Spring Boot and Spring are you running with? There is a working example (which hasn't been updated in a while, but should work) here. |
My example is here:https://github.com/michaldo/issue1 |
Unfortunately, your working example doesn't work on my computer. I cloned git repo, call mvn spring-boot:run, I get exceptions like Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'RecipientConfig' in string value "${RecipientConfig}" |
To get GitHook to work, you need to pass some arguments on the command line or else provide an As for your project, you are missing the CXF dependency in your
Once you do that you will get a different error ("org.apache.cxf.service.factory.ServiceConstructionException: No resource classes found") which is informing you that you haven't declared any JAX-RS Resource beans. In other words, you are trying to use CXF integration but you aren't using CXF. The |
Thank you, now I started my application.
|
I follow Spring Boot guide. I reached chapter 11.4
http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#getting-started-first-application-run
Everything is OK.
Then I add dependcy to spring-boot-cxf-jaxrs:1.1
I got exceptions like
ava.lang.IllegalStateException: Error processing condition on com.internetitem.spring.cxf.CxfConfiguration.jsonProvider
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:58)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:190)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:148)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:124)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:318)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:239)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
at cfx.Example.main(Example.java:17)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.boot.maven.RunMojo$LaunchRunner.run(RunMojo.java:418)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: @ConditionalOnMissingBean annotations must specify at least one bean (type, name or annotation)
at org.springframework.util.Assert.isTrue(Assert.java:65)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition$BeanSearchSpec.(OnBeanCondition.java:232)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:93)
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:45)
... 22 common frames omitted
What is wrong? Could you provide working demo how to use spring-boot-cxf-jaxrs?
The text was updated successfully, but these errors were encountered: