Skip to content

Instantly share code, notes, and snippets.

View marc0olo's full-sized avatar
🤘

Marco Walz marc0olo

🤘
View GitHub Profile
@jonikarppinen
jonikarppinen / CustomErrorController.java
Last active June 16, 2021 02:19
Example of replacing Spring Boot "whitelabel" error page with custom error responses (with JSON response body)
package com.company.project.controllers;
import com.company.project.model.api.ErrorJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.web.ErrorAttributes;
import org.springframework.boot.autoconfigure.web.ErrorController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.RequestAttributes;
#!/bin/bash
set -x
DATE=`date +%Y%m%d_%H%M%S`
OUTPUT_DIR=${DATE}
mkdir ${OUTPUT_DIR}
ROOT_PATH="/Users/gbougeard/REGISTRY/data"
@44uk
44uk / nem_cheatsheet.md
Last active August 31, 2018 08:22
nem cheatsheet

nem cheatsheet

Type

Code Desc
1 The result is a validation result.
2 The result is a heart beat result.
4 The result indicates a status.