Skip to content
Snippets Groups Projects
Commit 2d5dcdae authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Final adaptations to GIS aware result object

parent 93a87741
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ import javax.ws.rs.core.Application; ...@@ -25,7 +25,7 @@ import javax.ws.rs.core.Application;
/** /**
* Responsible for adding REST resources * Responsible for adding REST resources
* @copyright 2013-2014 {@link http://www.nibio.no NIBIO} * @copyright 2013-2018 {@link http://www.nibio.no NIBIO}
* @author Tor-Einar Skog <tor-einar.skog@nibio.no> * @author Tor-Einar Skog <tor-einar.skog@nibio.no>
*/ */
@ApplicationPath("/") @ApplicationPath("/")
...@@ -56,5 +56,6 @@ public class VIPSCoreApplication extends Application ...@@ -56,5 +56,6 @@ public class VIPSCoreApplication extends Application
*/ */
private void addRestResourceClasses(Set<Class<?>> resources) { private void addRestResourceClasses(Set<Class<?>> resources) {
resources.add(no.nibio.vips.core.config.JacksonConfig.class); resources.add(no.nibio.vips.core.config.JacksonConfig.class);
resources.add(no.nibio.vips.core.service.ModelResourceImpl.class);
} }
} }
\ No newline at end of file
/* /*
* Copyright (c) 2014 NIBIO <http://www.nibio.no/>. * Copyright (c) 2018 NIBIO <http://www.nibio.no/>.
* *
* This file is part of VIPSCore. * This file is part of VIPSCore.
* VIPSCore is free software: you can redistribute it and/or modify * VIPSCore is free software: you can redistribute it and/or modify
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
package no.nibio.vips.core.config; package no.nibio.vips.core.config;
import com.bedatadriven.jackson.datatype.jts.JtsModule;
import javax.ws.rs.Produces; import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import javax.ws.rs.ext.ContextResolver; import javax.ws.rs.ext.ContextResolver;
...@@ -29,7 +30,7 @@ import com.fasterxml.jackson.databind.SerializationFeature; ...@@ -29,7 +30,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
/** /**
* This config ensures that Jackson serializes dates as [ISO-8601 ]-compliant notation, * This config ensures that Jackson serializes dates as [ISO-8601 ]-compliant notation,
* and not a timestamp * and not a timestamp
* @copyright 2013 <a href="http://www.nibio.no/">NIBIO</a> * @copyright 2018 <a href="http://www.nibio.no/">NIBIO</a>
* @author Tor-Einar Skog <tor-einar.skog@nibio.no> * @author Tor-Einar Skog <tor-einar.skog@nibio.no>
*/ */
@Provider @Provider
...@@ -41,6 +42,7 @@ public class JacksonConfig implements ContextResolver<ObjectMapper>{ ...@@ -41,6 +42,7 @@ public class JacksonConfig implements ContextResolver<ObjectMapper>{
{ {
objectMapper = new ObjectMapper(); objectMapper = new ObjectMapper();
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
objectMapper.registerModule(new JtsModule());
} }
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment