In reviewing the dependencies declared in :module:spring-boot-jackson2 build.gradle, I noticed an api (here) AND an optional (here) dependency declaration on org.springframework:spring-web.
This is benign, but I believe the api declaration is sufficient. Although, outside of generating an "<optional>true</optional>" dependency declaration in the final Maven POM, ATM, I don't recall all the other facilities provided/supported by Spring Boot's custom optional configuration.
In any case, when I look at the final generated and published Maven POM for org.springframework.boot:spring-boot-jackson2 in Maven Central, it is correct. There is only a single compile-time dependency on org.springframework:spring-web as I would expect.
Therefore, I think the optional declaration is safe to remove.
In reviewing the dependencies declared in
:module:spring-boot-jackson2build.gradle, I noticed anapi(here) AND anoptional(here) dependency declaration onorg.springframework:spring-web.This is benign, but I believe the
apideclaration is sufficient. Although, outside of generating an "<optional>true</optional>" dependency declaration in the final Maven POM, ATM, I don't recall all the other facilities provided/supported by Spring Boot's customoptionalconfiguration.In any case, when I look at the final generated and published Maven POM for
org.springframework.boot:spring-boot-jackson2in Maven Central, it is correct. There is only a singlecompile-time dependency onorg.springframework:spring-webas I would expect.Therefore, I think the
optionaldeclaration is safe to remove.