Skip to content

Instantly share code, notes, and snippets.

@andgomes
Last active February 26, 2018 14:04
Show Gist options
  • Save andgomes/4830bb9be715c3c9371631abe5496a45 to your computer and use it in GitHub Desktop.
Save andgomes/4830bb9be715c3c9371631abe5496a45 to your computer and use it in GitHub Desktop.
package org.andgomes.web;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
@RequestMapping("/")
public class DefaultController {
@RequestMapping(method = RequestMethod.GET)
public String home() {
throw new NotFoundException();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment