Add automation.

This commit is contained in:
Paulo Gustavo Veiga
2024-01-22 21:54:37 -08:00
parent 27c310197e
commit d49766463a
6 changed files with 870 additions and 846 deletions

View File

@@ -17,10 +17,7 @@
*/
package com.wisemapping.rest;
import com.wisemapping.exceptions.ClientException;
import com.wisemapping.exceptions.OAuthAuthenticationException;
import com.wisemapping.exceptions.Severity;
import com.wisemapping.exceptions.ValidationException;
import com.wisemapping.exceptions.*;
import com.wisemapping.model.User;
import com.wisemapping.rest.model.RestErrors;
import com.wisemapping.security.Utils;
@@ -100,6 +97,14 @@ public class BaseController {
return new RestErrors(ex.getMessage(messageSource, locale), ex.getSeverity(), ex.getTechInfo());
}
@ExceptionHandler(AccessDeniedSecurityException.class)
@ResponseBody
@ResponseStatus(HttpStatus.FORBIDDEN)
public RestErrors handleAccessDeniedSecurityException(@NotNull AccessDeniedSecurityException ex) {
return new RestErrors(ex.getMessage(), ex.getSeverity(), ex.getTechInfo());
}
@ExceptionHandler(OAuthAuthenticationException.class)
@ResponseBody
public OAuthAuthenticationException handleOAuthErrors(@NotNull OAuthAuthenticationException ex, HttpServletResponse response) {

View File

@@ -12,7 +12,7 @@ spring.sql.init.mode=always
spring.sql.init.platform=hsqldb
# LOG
logging.level.root=INFO
logging.level.root=TRACE
logging.level.org.apache.tomcat=INFO
##################################################################################