提交 66a49ae8 编写于 作者: C Calvin

clean code

上级 71f7bb3c
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
It shows the mainstream technologies and pragmatic practice in JavaEE world. It shows the mainstream technologies and pragmatic practice in JavaEE world.
It has 3 major examples: It has 2 major examples:
1. Mini-web focus on the minimal CRUD web application 1. Quickstart a minimal CRUD Todo-List web application.
2. Mini-service focus on the SOAP and REST web service.
3. Showcase demonstrate many other interesting technologies. 3. Showcase demonstrate many other interesting technologies.
------------------------------- -------------------------------
......
...@@ -53,7 +53,6 @@ public class TaskRestController { ...@@ -53,7 +53,6 @@ public class TaskRestController {
return new ResponseEntity(HttpStatus.NOT_FOUND); return new ResponseEntity(HttpStatus.NOT_FOUND);
} }
return new ResponseEntity(task, HttpStatus.OK); return new ResponseEntity(task, HttpStatus.OK);
} }
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
......
...@@ -58,6 +58,9 @@ public class UserController { ...@@ -58,6 +58,9 @@ public class UserController {
return "account/userForm"; return "account/userForm";
} }
/**
* 演示自行绑定表单中的checkBox roleList到对象中.
*/
@RequiresPermissions("user:edit") @RequiresPermissions("user:edit")
@RequestMapping(value = "save/{userId}") @RequestMapping(value = "save/{userId}")
public String update(@Valid @ModelAttribute("user") User user, public String update(@Valid @ModelAttribute("user") User user,
...@@ -102,7 +105,7 @@ public class UserController { ...@@ -102,7 +105,7 @@ public class UserController {
} }
/** /**
* 不自动绑定对象中的roleList属性,另行处理 * 不自动绑定对象中的roleList属性,另行处理
*/ */
@InitBinder @InitBinder
protected void initBinder(WebDataBinder binder) { protected void initBinder(WebDataBinder binder) {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<ul style="padding: 15px;"> <ul style="padding: 15px;">
<li>CSS 大装修完毕。</li> <li>CSS 大装修完毕。</li>
<li>CXF的SOAP WebService 与 MyBais从Mini-Service搬了过来</li> <li>CXF的SOAP WebService 与 MyBais从Mini-Service搬了过来</li>
<li>Shiro的基于角色与权限的授权,与Jquery-Validate的高级使用搬了过来</li> <li>Shiro的授权演示搬了过来</li>
</ul> </ul>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -13,7 +13,9 @@ ...@@ -13,7 +13,9 @@
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$("#loginForm").validate(); $("#loginForm").validate({
errorElement: "span"
});
}); });
</script> </script>
</head> </head>
......
...@@ -70,14 +70,14 @@ ...@@ -70,14 +70,14 @@
</snapshots> </snapshots>
</repository> </repository>
<repository> <repository>
<id>spy</id> <id>spy</id>
<name>Spy Repository</name> <name>Spy Repository</name>
<layout>default</layout> <layout>default</layout>
<url>http://files.couchbase.com/maven2/</url> <url>http://files.couchbase.com/maven2/</url>
<snapshots> <snapshots>
<enabled>false</enabled> <enabled>false</enabled>
</snapshots> </snapshots>
</repository> </repository>
</repositories> </repositories>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册