-
Notifications
You must be signed in to change notification settings - Fork 41.2k
spring-boot 1.3.0.M5: Could not autowire field: private com.fasterxml.jackson.databind.ObjectMapper org.springframework.boot.actuate.autoconfigure.EndpointWebMvcHypermediaManagementContextConfiguration$MvcEndpointAdvice.mapper; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.fasterxml.jackson.databind.ObjectMapper] is defined: expected single matching bean but found 4: _halObjectMapper,objectMapper,halObjectMapper,jacksonMapper #4029
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
Comments
Related to #3439. Yes I do create my own |
Tried to comment these: //@EnableTransactionManagement
//@EnableWebMvc
//@EnableHypermediaSupport(type=HypermediaType.HAL) and removed my own
|
Probably related to spring-projects/spring-hateoas#333 |
Try simply annotating your own See this repo for an example of project demonstrating the issue that is similar to yours: |
Tried to exclude @SpringBootApplication(exclude=
{HypermediaAutoConfiguration.class,
LiquibaseAutoConfiguration.class} // java.lang.IllegalStateException: Cannot find changelog location: class path resource [db/changelog/db.changelog-master.yaml] (please add changelog or check your Liquibase configuration)
) |
@vpavic as I mentioned in #4029 (comment), I've removed my own |
Curiously this did not happen with boot 1.2.6. I simply wanted simple CORS support so instead of upgrading Spring to 4.2.1 I opted boot 1.3.0.M5 instead, now I've been struggling with Jackson a whole day :p If all else fails I probably will use boot 1.2.6 with spring 4.2.1 and hope that will work :) |
But yeah @vpavic thanks! That works! I'm still curious, why the workaround is actually adding my own Now I got 1.3.0.M5 + 4.2.1 running, but now struggling with CORS.. but that's another matter ;) |
OK I know my original cause, it's because of this: @Configuration @Profile("daemon")
public class MyRepositoryRestConfiguration extends
RepositoryRestMvcConfiguration {
@Override
protected void configureRepositoryRestConfiguration(
RepositoryRestConfiguration config) {
super.configureRepositoryRestConfiguration(config);
config.exposeIdsFor(Place.class);
}
} |
@ceefour everything is explained in the description of project linked in my previous comment. Generally there shouldn't issues having multiple However, when your project's configuration disables conditions defined by |
@vpavic Yes, but "my project's configuration" is not always "100% mine", in which case it's simply an |
Solution is:
Case solved. |
MyMvcConfiguration.java
:Error:
The text was updated successfully, but these errors were encountered: