add spring security and token management

This commit is contained in:
dirgantarasiahaan
2023-05-23 19:42:51 +07:00
parent 597d4062c7
commit c76c01a174
35 changed files with 1095 additions and 53 deletions

View File

@ -1,28 +0,0 @@
package com.iconplus.smartproc.exception;
import java.util.Date;
public class ErrorDetails {
private Date timestamp;
private String message;
private String details;
public ErrorDetails(Date timestamp, String message, String details) {
super();
this.timestamp = timestamp;
this.message = message;
this.details = details;
}
public Date getTimestamp() {
return timestamp;
}
public String getMessage() {
return message;
}
public String getDetails() {
return details;
}
}

View File

@ -5,6 +5,7 @@ import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.Velocity;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.context.Context;
import org.apache.velocity.runtime.resource.loader.StringResourceLoader;
import org.apache.velocity.runtime.resource.util.StringResourceRepository;
import org.springframework.context.annotation.Configuration;
@ -88,7 +89,7 @@ public class ErrorHelper {
.getApplicationAttribute(StringResourceLoader.REPOSITORY_NAME_DEFAULT);
resourceRepository.putStringResource(RAW_TEMPLATE, rawNotificationTemplate);
return new VelocityContext(parameters);
return new VelocityContext((Context) parameters);
}
private void addVelocityProperties() {