Class DmxFunJacksonAutoConfiguration

java.lang.Object
dmx.fun.spring.boot.jackson.DmxFunJacksonAutoConfiguration

@AutoConfiguration @ConditionalOnClass({com.fasterxml.jackson.databind.ObjectMapper.class,DmxFunModule.class}) @ConditionalOnProperty(name="dmx.fun.jackson.enabled", havingValue="true", matchIfMissing=true) @NullMarked public class DmxFunJacksonAutoConfiguration extends Object
Spring Boot autoconfiguration that registers DmxFunModule with the application's Jackson ObjectMapper.

Activates only when both jackson-databind and fun-jackson are on the classpath. Spring Boot's JacksonAutoConfiguration detects all Module beans and registers them automatically, so no manual ObjectMapper.registerModule(...) call is needed.

Back-off: if the application already declares a DmxFunModule bean, this autoconfiguration does not register a second one.

Opt out: set dmx.fun.jackson.enabled=false in application.properties.

  • Constructor Details

    • DmxFunJacksonAutoConfiguration

      public DmxFunJacksonAutoConfiguration()
      Default constructor required for Spring Boot auto-configuration instantiation.
  • Method Details

    • dmxFunModule

      @Bean @ConditionalOnMissingBean(DmxFunModule.class) public DmxFunModule dmxFunModule()
      Registers a DmxFunModule bean so that Spring Boot's JacksonAutoConfiguration can discover and apply it to the application's ObjectMapper automatically.

      Skipped when the application already declares its own DmxFunModule bean (@ConditionalOnMissingBean).

      Returns:
      a ready-to-use DmxFunModule instance