Skip to content

Instantly share code, notes, and snippets.

@susimsek
susimsek / CustomExceptionControllerAdvice.java
Last active September 13, 2023 02:04
Spring Boot File Content Type Validation With Annotation
@ControllerAdvice
public class CustomExceptionControllerAdvice {
@ExceptionHandler(MultipartException.class)
void handleMultipartException(MultipartException ex,HttpServletResponse response) throws IOException {
response.sendError(HttpStatus.BAD_REQUEST.value(),"Please select a file");
}
@ExceptionHandler(ConstraintViolationException.class)
public void handleConstraintViolationException(ConstraintViolationException ex,HttpServletResponse response) throws IOException {
@ricardozanini
ricardozanini / change-soapui-workspacedir.md
Last active October 25, 2023 12:42
How to set the default workspace dir for SoapUI

How to set the default workspace dir for SoapUI

  1. Locate the SoapUI installation dir
  2. Edit the SoapUI-X.X.X.vmoptions (X.X.X is the SoapUI version) and add the -Duser.home=<YOUR_NEW_WORKSPACE_DIR>.
  3. Restart SoapUI
  4. Done
@DomPizzie
DomPizzie / README-Template.md
Last active April 21, 2025 18:07
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started