Fixed exception mapper
This commit is contained in:
parent
3f1f17d05c
commit
1afbb2ecb8
28
pom.xml
28
pom.xml
|
@ -35,9 +35,6 @@
|
||||||
<role>developer</role>
|
<role>developer</role>
|
||||||
</roles>
|
</roles>
|
||||||
<timezone>Europe/Rome</timezone>
|
<timezone>Europe/Rome</timezone>
|
||||||
<properties>
|
|
||||||
<picUrl>https://gravatar.com/lucafrosini</picUrl>
|
|
||||||
</properties>
|
|
||||||
</developer>
|
</developer>
|
||||||
<developer>
|
<developer>
|
||||||
<id>lucio.lelii</id>
|
<id>lucio.lelii</id>
|
||||||
|
@ -51,9 +48,6 @@
|
||||||
<role>developer</role>
|
<role>developer</role>
|
||||||
</roles>
|
</roles>
|
||||||
<timezone>Europe/Rome</timezone>
|
<timezone>Europe/Rome</timezone>
|
||||||
<properties>
|
|
||||||
<picUrl>https://gravatar.com/latinswing</picUrl>
|
|
||||||
</properties>
|
|
||||||
</developer>
|
</developer>
|
||||||
<developer>
|
<developer>
|
||||||
<id>alfredo.oliviero</id>
|
<id>alfredo.oliviero</id>
|
||||||
|
@ -67,21 +61,18 @@
|
||||||
<role>developer</role>
|
<role>developer</role>
|
||||||
</roles>
|
</roles>
|
||||||
<timezone>Europe/Rome</timezone>
|
<timezone>Europe/Rome</timezone>
|
||||||
<properties>
|
|
||||||
<picUrl>https://gravatar.com/alfredooliviero</picUrl>
|
|
||||||
</properties>
|
|
||||||
</developer>
|
</developer>
|
||||||
</developers>
|
</developers>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>11</java.version>
|
<java.version>11</java.version>
|
||||||
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
|
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|
||||||
<!-- OPTIONAL. for authorization-control-library -->
|
<!-- OPTIONAL. for authorization-control-library -->
|
||||||
<aspectj-plugin.version>1.14.0</aspectj-plugin.version>
|
<!-- <aspectj-plugin.version>1.14.0</aspectj-plugin.version>-->
|
||||||
|
|
||||||
<enunciate.version>2.16.1</enunciate.version>
|
<enunciate.version>2.16.1</enunciate.version>
|
||||||
|
|
||||||
|
@ -163,19 +154,6 @@
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
||||||
<!-- OPTIONAL generate the war in a different folder, that will be
|
|
||||||
mounted on docker
|
|
||||||
container -->
|
|
||||||
<!-- <plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
|
||||||
<version>2.3</version>
|
|
||||||
<configuration>
|
|
||||||
<warName>identity-manager</warName>
|
|
||||||
<outputDirectory>tomcat/webapps</outputDirectory>
|
|
||||||
</configuration>
|
|
||||||
</plugin> -->
|
|
||||||
|
|
||||||
<!-- OPTIONAL. authorization-control-library: add this plugin if you
|
<!-- OPTIONAL. authorization-control-library: add this plugin if you
|
||||||
want to use gcube
|
want to use gcube
|
||||||
authorization control funzionalities -->
|
authorization control funzionalities -->
|
||||||
|
|
|
@ -14,7 +14,7 @@ import jakarta.ws.rs.ext.Provider;
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
@Provider
|
@Provider
|
||||||
public class IDMExceptionMapper implements ExceptionMapper<Exception> {
|
public class ServiceExceptionMapper implements ExceptionMapper<Exception> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Response toResponse(Exception exception) {
|
public Response toResponse(Exception exception) {
|
||||||
|
@ -48,7 +48,6 @@ public class IDMExceptionMapper implements ExceptionMapper<Exception> {
|
||||||
}
|
}
|
||||||
responseBean.setSuccess(false);
|
responseBean.setSuccess(false);
|
||||||
responseBean.setMessage(exceptionMessage);
|
responseBean.setMessage(exceptionMessage);
|
||||||
// responseBean.set
|
|
||||||
|
|
||||||
return Response.status(status).entity(responseBean).type(mediaType).build();
|
return Response.status(status).entity(responseBean).type(mediaType).build();
|
||||||
}
|
}
|
|
@ -14,10 +14,6 @@
|
||||||
<param-name>jersey.config.server.provider.packages</param-name>
|
<param-name>jersey.config.server.provider.packages</param-name>
|
||||||
<param-value>org.gcube.service.helloworld.rest</param-value>
|
<param-value>org.gcube.service.helloworld.rest</param-value>
|
||||||
</init-param>
|
</init-param>
|
||||||
<!-- <init-param>-->
|
|
||||||
<!-- <param-name>jersey.config.server.provider.packages</param-name>-->
|
|
||||||
<!-- <param-value>org.gcube.service.helloworld.mappers</param-value>-->
|
|
||||||
<!-- </init-param>-->
|
|
||||||
</servlet>
|
</servlet>
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>default</servlet-name>
|
<servlet-name>default</servlet-name>
|
||||||
|
|
Loading…
Reference in New Issue