Skip to content
Snippets Groups Projects

Resolve "Create missing service classes"

2 files
+ 35
0
Compare changes
  • Side-by-side
  • Inline
Files
2
package cz.muni.csirt.kypo.elasticsearch.service.config;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* The type Object mapper config elasticsearch.
*/
@Configuration
public class ObjectMapperConfigElasticsearch {
/**
* Object mapper object mapper.
*
* @return the object mapper
*/
@Bean("objMapperForElasticsearch")
public ObjectMapper objectMapper() {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
objectMapper.registerModule(new JavaTimeModule());
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
return objectMapper;
}
}
Loading