@JsonIgnore
    public AbstractDbConfig mergeConfig(final AbstractDbConfig otherDbConfig) {

//        // These will contain all hard coded defaults
//        final DbConfig outputConfig = new CommonDbConfig();
//        final DbConfig vanillaConfig = new CommonDbConfig();
//
//        // If the custom config has been set in common config then copy it over
//        FieldMapper.copyNonDefaults(this, outputConfig, vanillaConfig);
//        // If the custom config has been set in the module specific config then copy it over
//        FieldMapper.copyNonDefaults(otherDbConfig, outputConfig, vanillaConfig);

//        final DbConfig outputConfig = new DbConfig();

        // A new instance of ConnectionConfig has all nulls so use defaults()
        final ConnectionConfig defaultConnectionConfig = ConnectionConfig.defaults();

        final ConnectionConfig mergedConnectionConfig1 = defaultConnectionConfig.merge(getConnectionConfig());
        final ConnectionConfig mergedConnectionConfig2 = mergedConnectionConfig1.merge(
                otherDbConfig.getConnectionConfig());

        final ConnectionPoolConfig defaultPoolConfig = new ConnectionPoolConfig();

        // common trumps ctor defaults
        final ConnectionPoolConfig mergedPoolConfig1 = defaultPoolConfig.merge(
                this.getConnectionPoolConfig(), true, false);

        // merge non-null values from the module specific config over the common ones.
        final ConnectionPoolConfig mergedPoolConfig2 = mergedPoolConfig1.merge(
                otherDbConfig.getConnectionPoolConfig(),
                false,
                false);

        final AbstractDbConfig mergedConfig = new AbstractDbConfig(mergedConnectionConfig2, mergedPoolConfig2) {
        };
        LOGGER.debug("""
                        mergeConfig() called for {}
                        common: {}
                        other: {}
                        merged: {}""",
                otherDbConfig.getClass().getName(),
                this,
                otherDbConfig,
                mergedConfig);
        return mergedConfig;
    }
Creates a new {@link AbstractDbConfig} then deep copies in the values of
this, followed by values of otherDbConfig.
Thus allowing otherDbConfig to override values in this {@link CommonDbConfig}
stroom-config/stroom-config-common/src/main/java/stroom/config/common/CommonDbConfig.java