import com.google.common.collect.ImmutableMap;
import java.io.File;
import java.util.Map;
import static com.google.common.base.Preconditions.checkNotNull;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Spring RestController: how to deal with exception and http status | |
@ResponseStatus(HttpStatus.NOT_FOUND) | |
class UserNotFoundException extends RuntimeException { | |
public UserNotFoundException(String userId) { | |
super("could not find user '" + userId + "'."); | |
} | |
} |