Fix checkstyle violations in samples
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,10 +31,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
/**
|
||||
* @author Rob Winch
|
||||
* @author Doo-Hwan Kwak
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/")
|
||||
public class MessageController {
|
||||
@@ -77,14 +73,14 @@ public class MessageController {
|
||||
throw new RuntimeException("Expected exception in controller");
|
||||
}
|
||||
|
||||
@GetMapping(value = "delete/{id}")
|
||||
@GetMapping("delete/{id}")
|
||||
public ModelAndView delete(@PathVariable("id") Long id) {
|
||||
this.messageRepository.deleteMessage(id);
|
||||
Iterable<Message> messages = this.messageRepository.findAll();
|
||||
return new ModelAndView("messages/list", "messages", messages);
|
||||
}
|
||||
|
||||
@GetMapping(value = "modify/{id}")
|
||||
@GetMapping("modify/{id}")
|
||||
public ModelAndView modifyForm(@PathVariable("id") Message message) {
|
||||
return new ModelAndView("messages/form", "message", message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user