class PluginParserAutoConfiguration {
    @Autowired
    private Environment environment;

    @Bean
    public PluginConfigParser pluginConfigParser() {<FILL_FUNCTION_BODY>}

    @Bean
    public PluginConfigDeparser pluginDeconfigParser() {
        String configFormat = environment.getProperty(DiscoveryConstant.SPRING_APPLICATION_CONFIG_FORMAT, String.class, DiscoveryConstant.XML_FORMAT);
        ConfigFormatType configFormatType = ConfigFormatType.fromString(configFormat);
        switch (configFormatType) {
            case XML_FORMAT:
                return new XmlConfigDeparser();
            case JSON_FORMAT:
                return new JsonConfigDeparser();
        }

        throw new DiscoveryException("Invalid config format for '" + configFormat + "'");
    }
}

        String configFormat = environment.getProperty(DiscoveryConstant.SPRING_APPLICATION_CONFIG_FORMAT, String.class, DiscoveryConstant.XML_FORMAT);
        ConfigFormatType configFormatType = ConfigFormatType.fromString(configFormat);
        switch (configFormatType) {
            case XML_FORMAT:
                return new XmlConfigParser();
            case JSON_FORMAT:
                return new JsonConfigParser();
        }

        throw new DiscoveryException("Invalid config format for '" + configFormat + "'");
    
<no_super_class>