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>
|
||||
</roles>
|
||||
<timezone>Europe/Rome</timezone>
|
||||
<properties>
|
||||
<picUrl>https://gravatar.com/lucafrosini</picUrl>
|
||||
</properties>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>lucio.lelii</id>
|
||||
|
@ -51,9 +48,6 @@
|
|||
<role>developer</role>
|
||||
</roles>
|
||||
<timezone>Europe/Rome</timezone>
|
||||
<properties>
|
||||
<picUrl>https://gravatar.com/latinswing</picUrl>
|
||||
</properties>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>alfredo.oliviero</id>
|
||||
|
@ -67,21 +61,18 @@
|
|||
<role>developer</role>
|
||||
</roles>
|
||||
<timezone>Europe/Rome</timezone>
|
||||
<properties>
|
||||
<picUrl>https://gravatar.com/alfredooliviero</picUrl>
|
||||
</properties>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<properties>
|
||||
<java.version>11</java.version>
|
||||
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
|
@ -163,19 +154,6 @@
|
|||
<build>
|
||||
<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
|
||||
want to use gcube
|
||||
authorization control funzionalities -->
|
||||
|
|
|
@ -14,7 +14,7 @@ import jakarta.ws.rs.ext.Provider;
|
|||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
@Provider
|
||||
public class IDMExceptionMapper implements ExceptionMapper<Exception> {
|
||||
public class ServiceExceptionMapper implements ExceptionMapper<Exception> {
|
||||
|
||||
@Override
|
||||
public Response toResponse(Exception exception) {
|
||||
|
@ -48,7 +48,6 @@ public class IDMExceptionMapper implements ExceptionMapper<Exception> {
|
|||
}
|
||||
responseBean.setSuccess(false);
|
||||
responseBean.setMessage(exceptionMessage);
|
||||
// responseBean.set
|
||||
|
||||
return Response.status(status).entity(responseBean).type(mediaType).build();
|
||||
}
|
|
@ -14,10 +14,6 @@
|
|||
<param-name>jersey.config.server.provider.packages</param-name>
|
||||
<param-value>org.gcube.service.helloworld.rest</param-value>
|
||||
</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-mapping>
|
||||
<servlet-name>default</servlet-name>
|
||||
|
|
Loading…
Reference in New Issue