Initial commit

This commit is contained in:
2024-04-07 19:41:57 -04:00
parent 2b3212cb44
commit 8f0d1c64bd
95 changed files with 6787 additions and 45 deletions

View File

@@ -0,0 +1,36 @@
package com.mattrixwv.cipherstream.aspect;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.context.annotation.Configuration;
import com.fasterxml.jackson.databind.node.ObjectNode;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@Aspect
@Configuration
public class CipherStreamLoggingAspect{
public static final String CIPHER_NAME_LOGGING = "cipher";
@Pointcut("@annotation(org.springframework.web.bind.annotation.RequestMapping) || @annotation(org.springframework.web.bind.annotation.GetMapping) || @annotation(org.springframework.web.bind.annotation.PutMapping) || @annotation(org.springframework.web.bind.annotation.PostMapping) || @annotation(org.springframework.web.bind.annotation.DeleteMapping)")
public void mappedFunction(){
//Intentionally blank
}
@Pointcut("execution(* com.mattrixwv.cipherstream.controller..*(..))")
public void cipherMethod(){
//Intentionally blank
}
@AfterReturning(pointcut = "cipherMethod() && mappedFunction()", returning = "returnedJson")
public void getCipherInfo(ObjectNode returnedJson){
//Print a log
log.info("CipherStream log {}", returnedJson);
}
}