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DIuj/q0xjyTt+jSbpP4QkDOWODZngOHB0fIx7PBEXHvgcOUcTnVpzUyb6rVSduoX94WyAcLPPO91nwzINCa77Vmyrjc6tNqv+OkSdimn1V/R4/8QhC+nQ4WeLZtb8uNO4LqSHbDH+3zR/v8wra9Lex3CSg0Fni25ZWTXwxFvxiKXlf+V1rYuvsk+10CCo0FnjXsPNWw61TDrrb6nW3SQnq5rWHnqYadbex3CSg0kAsCWACeASwAzwAWgGcACyBPC7AA8rQAC/jK0yrrSlFXpp/QpjCUtawy6zWf8qsKwEAsaJrwmafNSES57XjN586UeNEMV7jV7nG53W7VRiS3IBFkGpzmaYk/pplBuiOuSGmoeipvkKuURO0e0t1SIH94y9OqU7RECdKC6cWBVIEfPOsoDcuiMpATvOVpqWkNbG1GL1w0fc+wUG1qkCJTBKdn04TDPK2ipBnhYIPLpYynqTwjZyE1AVo4npkAl3lazCStBIrLQ1WqjHZ+lv4ugNvXLm8aPDMTvvK0Bq4DCCFZYsIb/2REkYXUGAyemQBneVr5/U5/EUn9qZhWirRoeE/a5x3XfG7tjEz74A3IAcjTAiyAPC3AAsjTAiyAXBDAAvAMYAF4BrAAPANYAJ4BLPj/pmW9XsloUsMAAAAASUVORK5CYII=" alt="" />

一、添加控制器(controller和action)——/app/controllers/Products.java

package controllers;
import play.mvc.Controller;
import play.mvc.Result;
public class Products extends Controller {
public static Result list() { //列出所有的产品
return TODO;
}
public static Result newProduct() { //显示一个空的产品Form
return TODO;
}
public static Result details(String ean) { //显示一个编辑产品的Form
return TODO;
}
public static Result save() { //保存产品资料
return TODO;
}
}

说明:  controllers的action方法必须满足以下三个条件:

  • 必须是public
  • 必须是static
  • 返回类型必须是Result和Result的子类

完整代码为

package controllers;

import models.Product;
import play.data.Form;
import play.mvc.Controller;
import play.mvc.Result;
import java.util.ArrayList;
import java.util.List; import views.html.*; public class Products extends Controller {
//constant for Form
private static final Form<Product> productForm = Form.form(Product.class); public static Result list(){
List<Product> products = Product.findAll();
return ok(list.render(products));
} public static Result newProduct(){
return ok(details.render(productForm));
} public static Result details(String ean){
final Product product = Product.findByEan(ean);
if(product == null){
return notFound(String.format("Product %s does not exist.", ean));
} Form<Product> filledForm = productForm.fill(product);
return ok(details.render(filledForm));
} public static Result save(){
Form<Product> boundForm = productForm.bindFromRequest();
if(boundForm.hasErrors()){
flash("error","Please correct the form below.");
return badRequest(details.render(boundForm));
} Product product = boundForm.get();
product.save();
flash("success",String.format("Successfully added product %s", product));
return redirect(routes.Products.list());
} public static Result delete(String ean){
final Product product = Product.findByEan(ean);
if(product == null){
return notFound(String.format("Product %s does not exist.", ean));
} Product.remove(product);
return redirect(routes.Products.list());
}
}

Java Code

二. 修改routes文件

GET       /products/       controllers.Products.list()
GET /products/new controllers.Products.newProduct()
GET /products/:ean controllers.Products.details(ean: String)
POST /products/ controllers.Products.save()
DELETE  /products/:ean   controllers.Products.delete(ean: String)

action和route对应关系如下图

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAj8AAADrCAIAAAAJ/mBwAAAgAElEQVR4nOy9/VdTV9r/P/9JXMavqzOrnVopq7PsjK665paHpS5klKp8xCLlQVsQvYH6AdQCzgxQe5IbA1awhRbiQ9SeoBLa0BqmYAt+2JakDbceS6gEEkkEhaMQPMne3x9OnnOCRMEEc71Wfqgn++x97eva53rvvc8O/QMBAAAAgKXGH8JtAAAAAACEDKgXAAAAsPQA9QIAAACWHqBeAAAAwNID1AsAAABYeoB6AQAAAEsPUC8AAABg6QHqBQAAACw9QL0AAACApQeoFwAAALD0APUCAAAAlh6gXgAAAMDSA9QLAAAAWHqAegEAAABLD1AvAJgH+NHogE6r1eoGx7lw2wIAAIle9eK0p5ISkk5pvTIRN9Z+JC7uSPvY3fai5Li4hIBPclF7b/CvRslYe5H/9a051VdvP3KEr59PA08NfvdF/X/uhduOSMZ2r+fLj3ZudsU0MWnfqev3bM9SU4je5rT1SXF7Tmkfuf/jWRoNCW8Lx9qLXkyjYWTB88Ap2dJLAksWUC/PJdeofTw++K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Zaz3Sx/cNl/aCCwpHi85DrY0HzsnQO5WsWTpYaT77PDdfvqTeZWy5GX5FHBbJZyE0VRy8KNqr/vNV+0Ui/7vpdqSZ5W7IVtysc7z1k3edVZLF70EDktxWNReSka4wjRKOPy5gvKl6pwrqz61TcixRcXtL4Pp6cw83S7rQOR4ovKLt5WWorHFI1WtlcAy7BiXt3dpYYWc7RkRwVjeCsHxk7ls39SHT/bXIXHSf/7JKlcM60sU1l7mV5qRIovFjUUSa3e0zjDqP43v3OHFi7cuVNrM+rDOm/BWUp0vaICUjzGvMzcfcyqOF9QK+UxM9LirzfC8ouKZH3O8erLX+S/z2Y2y957gX9rI+/Zqjjr/mDI92d5ZkCoXbtOLwUMLU2qm16gUPQRsyTy34KnpeG47Rt/KOCxHTW/P37n8R7d7WjFQ3o9FW//FBKEkPBbdNc/1gA1rdzphaGlCdLLUDT/tkjulWcDvJjMxEN6AWSVO71AE6QXVALSCziC9KoKpBdUAtILOIL0qgqkF1QC0gs4gvSqCqQXVALSCziC9KoKpBdUAtILOIL0qgqkF1QC0gs4oj29sJV3K1fXAOQhvYAjmCINC10DeiG9gCOYIg0LXQN6Ib2AI5giDQtdA3ohvYAjmCINC10DeiG9gCOYIg0LXQN6Ib2AI5giDQtdA3ohvYAjmCINC10DeiG9gCOYIg0LXQN6Ib2AI5giDQtdA3ohvYAjmCINC10DeiG9gCOYIg0LXQN6Ib2AI5giDQtdA3ohvYAjVf+xWmzbbNUeHVBjkF4AAFB7kF4AAFB7kF4AAFB7kF4AAFB7kF4AAFB7kF4AAFB7/gfuvnVNVggopQAAAABJRU5ErkJggg==" alt="" width="448" height="183" />

三 . 添加Model Class——/app/models/Product.java

3.1) 数据模型

public class Product {
public String ean;
public String name;
public String description; public Product(){} public Product(String ean, String name, String description){
this.ean = ean;
this.name = name;
this.description = description;
} public String toString(){
return String.format("%s - %s", ean, name, description);
}
}

说明:    不同于Java,play使用public,不用setter和getter方法

3.2)为了模拟练习,在Product.java中加一些模拟数据

// mocking some data
private static List<Product> products;
static {
products = new ArrayList<Product>();
products.add(new Product("111111111","Paperclips 1","Paperclips description 1"));
products.add(new Product("222222222","Paperclips 2","Paperclips description 2"));
products.add(new Product("333333333","Paperclips 3","Paperclips description 3"));
products.add(new Product("444444444","Paperclips 1","Paperclips description 4"));
products.add(new Product("555555555","Paperclips 1","Paperclips description 5"));
}

3.3) 数据处理方法——findAll(), findByEan(), findByName(), remove(), save()

    public static List<Product> findAll(){
return new ArrayList<Product>(products);
} public static Product findByEan(String ean){
for(Product candidate : products){
if(candidate.ean.equals(ean)){
return candidate;
}
}
return null;
} public static List<Product> findByName(String term){
final List<Product> results = new ArrayList<Product>();
for(Product candidate : products){
if(candidate.name.toLowerCase().contains(term.toLowerCase())){
results.add(candidate);
}
}
return results;
} public static boolean remove(Product product){
return products.remove(product);
} public void save(){
products.remove(findByEan(this.ean));
products.add(this);
}

完整代码为

Java Code

四、添加和修改模板文件——list.scala.html, details.scala.html

4.1) list.scala.html

@(products:List[Product])    <!--parameter list: define which parameters this template accepts -->

@main("Product catalogue"){   <!-- call main template, the title is "Product catalogue" -->
<h2>All Product</h2>
<table class="table table-striped">
<thead>
<tr>
<th>EAN</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
@for(product <- products){
<tr>
<td><a href="@routes.Products.details(product.ean)">@product.ean</a></td>
<td><a href="@routes.Products.details(product.ean)">@product.name</a></td>
<td><a href="@routes.Products.details(product.ean)">@product.description</a></td>
</tr>
}
</tbody>
</table>
}

相应的,修改controller用于显示该模板的HTML内容,即修改/app/controllers/Products.java中的list()方法

...
import views.html.*; //引入模板 public class Products extends Controller {
public static Result list() {
List<Product> products = Product.findAll();
return ok(list.render(products));
}
...
}

在浏览器地址栏输入: http://localhost:9000/products

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAm4AAAEtCAIAAAA+7nsbAAAcSklEQVR4nO3d4WsjR5rH8f2f+pUZwjB6McfesoFZAoHJvsiAccjui3DEL0JubwLhjB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XN3ehjDhKAFFaicaNEGsH9U9f95wNlod0RFedUXp+smq0rHY2G/E+ShTDeZl1BW/xTWgztsOpuKjEqpL6DqpQ6vuk5UCbBMt/VntjK9K0cxHrKK7pu8JR9LmvsmeZKK1E00aI3X4WXeHuWQ16OmkNuaiu2lF6MDJbVvvERGnxQeMlUJlZo9RXgOq+HU6BF1taItOXunHO4SmU7rfA1RbK1N5u+GKYfVzcVtNGSChKg+dweoM1iVJeAlUqi1L7KdGe0VpvRxR/obRe0jNP3ynm61k4fVdo2b8AkjpSicaNkNgJXqesQf8ErydK72SCl2I4TzHLjsxnSFsLUOftiBEslOplmS5WdKyh0JY/mGsu8itqxfqS/vO4N8yWV5QsKsmPYveKs9J5a94I0df12MuOHN1zN+jsZChKfQ/ITMuOyt5wUAznKGaCV7vaYTz0dd+OUqGrKdmM1rQKmO+Od0euB1xbxG+u7DcOcV78AIPnnMN1FK1X4aQkSivRyBGiuuH/MIyWwe4GHZ0MnpW6uppeoI39MEzMBC/FcF744kBU627WMrBior4YIZYadRVeRCmqRaFEGCPEUqOuwosoRbUolAhjhFhq1FV4EaUAAIgQpQAAiBClAACIEKUAAIgQpQAAiBClAACIEKUAAIgQpQAAiBClAACIEKUAAIikUToBAAC3QpQCACBClAIAIEKUAgAgQpQCACBClAIAIEKUAgAgQpQCACBClAIAIEKUAgAgQpQCACBClAIAIEKUAgAgQpQCACBClAIAIEKUAgAgQpQCACBClAIAIEKUAgAgQpQCACDy/zzABmni/hthAAAAAElFTkSuQmCC" alt="" width="424" height="205" />

4.2) details.scala.html

@(productForm:Form[Product])
@import helper._
@import helper.twitterBootstrap._ @main("Product Form"){
<h1>Product Form</h1>
@helper.form(action = routes.Products.save()){
<fieldset>
<legend>Product(@productForm("name").valueOr("New"))</legend>
@helper.inputText(productForm("ean"),'_label -> "EAN")
@helper.inputText(productForm("name"),'_label -> "Name")
@helper.textarea(productForm("description"),'_label -> "description")
</fieldset>
<input type="submit" class="btn btn-primary" value="Save" />
<a class="btn" href="@routes.Application.index()">Cancel</a>
}
}

说明:  本模板使用了Play表单Form

  • @(productForm:Form[Product]) —>— productForm是play.data.Form.form()的方法,在controller中定义
  • @import helper._ —>— 引入生产HTML,@import helper.twitterBootstrap._ 生产的HTML符合Twitter Bootstrap标准
  • @helper.form(action =routes.Products.save()){ —>— 生产的 HTML的Form代码, 并将数据提交给controller的save()方法处理,@helper.inputText生产的 HTML的input代码,@helper.textarea生产的 HTML的textarea代码
  • Product(@productForm("name").valueOr("New"))  —>— productForm.field("name")的缩写,请求表单中名为name的域(field)值,如何该值不存在,则创建一个"New"为默认值。

最后生产的HTML代码如下

<form action="/products" method="GET" >
<fieldset>
<legend>Product(New)</legend>
<div class="clearfix " id="ean_field">
<label for="ean">EAN</label>
<div class="input">
<input type="text" id="ean" name="ean" value="" >
<span class="help-inline"></span>
<span class="help-block">Required</span>
</div>
</div> <div class="clearfix " id="name_field">
<label for="name">Name</label>
<div class="input">
<input type="text" id="name" name="name" value="" >
<span class="help-inline"></span>
<span class="help-block">Required</span>
</div>
</div>
<div class="clearfix " id="description_field">
<label for="description">description</label>
<div class="input">
<textarea id="description" name="description" ></textarea>
<span class="help-inline"></span>
<span class="help-block"></span>
</div>
</div>
</fieldset>
<input type="submit" class="btn btn-primary" value="Save" />
<a class="btn" href="/products">Cancel</a>
</form>

HTML Code

相应的,修改controller用于显示该模板的HTML内容,即修改/app/controllers/Products.java中的newProduct()()方法

    public static Result newProduct(){
return ok(details.render(productForm));
}

在浏览器地址栏输入: http://localhost:9000/products/new

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUIAAAGZCAIAAABzNq8nAAAZqElEQVR4nO3d72sbd57Acf9Pw/7QucGoDxzSsKEuZgNODhwoLd48CIv9wDTFaQOhYaNjzQny4Ly4vpiG6/pMcUOPKiYJbn00ztXEakiKu93Kies6cUXXXadEz+YezK/vd35II3vk0Wfm/cIPktFoZizprfkpq6dS3TEBSNZDxoB0ZAyIR8aAeGQMiEfGgHhkDIhH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rwt/in9aeenS8m/euV3d/DntRwzoOj2V6s6rk3dfurSceqstf166tPzq5N20HzGg6/RUqju/fedO166Hfevkf7l4J+1HDOg6PZXqzq8mbqWeaMyfX03cSvsRA7oOGQPikTEgHhkD4pExIB4ZA+KRMSBe2xlf+bty779/Jyrj+nvKpN5Y/uWgD17cmX71wY+HMivkVXsZX/m7mu7DuZ8Ou+T9Z/zj5htX7r33tfv/+ntX7r38cT2ZR7EZMkbHtZXxd3fNF3OzypBPd01z94r179mn3yvTvftpMHv1vw/nfnJG/enpSMcz/uWD9wOr36+/edkN7MfNN5S5OLXX37vy1QdfuzcpNbrjv7/5WJ/Ly/7hZIyOayvjJqvf7+466dq5WnmrnXvjPJz7yfz+y4fWyCNfvohf8j4z/nHzjWYt1d9TVtTLH997+co3y85w59/m8sdunO746ruD9k7xePkrZWQyRme1u2/8nffRhCbtefUqebsDtbbtqt23gI5k/PU3bo3tjKzl7Q0PnZp/4C8fvG/dl4zRcfs+Uu30rK2clcidUN0NafcfI1+GfJ2fu3JOL2P1AFizjJU1refx8lfBpX1j+RcyxiE42Amn2aff23vLdsB2jer61v63t1puayu6kxvVvzy2h9gB25vErdbGkRkHBjoTJ2N0VjsZ+zeGlW3mT3e1MoO7xF8+/d4f9iFmHHqIyz12/fU3WoHJbFS7yBgd1/4hLiXXkS9fhOzu2oesvWPa9la070yVO51Pd03fAfDkM7ajVUpWTjipBdqHoK3wIjJWhj9e/so5a/XLB+8rB6i9w+BkjI472OUfStLKcG0T2g1bP4ilnHCK3fCBMjbNJpd/LH/sDv9m2as0KmP1BJX/sJYzHTddMkbHcTEmIB4ZA+KRMSAeGQPikTEgHhkD4vVUqjsFQX+n+t07aT9iQNfpqVR3Tvz5C741ApCrp1LdqW7+/OsLt7v/O5x+feH2/9V2037EgK5jf6NidfPnE3/+opu/UfHVybs0DITi+40B8cgYEI+MAfHIGBDv/wHvQjHMvNPxmwAAAABJRU5ErkJggg==" alt="" width="227" height="288" />

五、处理表单提交和验证——binding values from the request

play可以从HTTP request获取一个包含name/value对的映射Map,实现这个功能的是类Form的bindFromRequest()方法,该方法会返回一个Form对象,故我们可以在保存的时候获取页面表单的数据。

5.1) 在/app/models/Products.java中加入

public class Products extends Controller {
...
public static Result save() {
Form<Product> boundForm = productForm.bindFromRequest();
Product product = boundForm.get();
product.save();
return ok(String.format("Saved product %s", product));
}
}

5.2) 在/app/models/Product.java中加入验证

...
import play.data.validation.Constraints;
public class Product {
...
@Constraints.Required
public String ean;
@Constraints.Required
public String name;
public String description;
...
}

5.3) 对/app/models/Products.java中save()的改进

对模型加入验证数据后,希望能在controller中显示相应的成功、失败信息,这里可以使用play的validation表单功能,修改save()方法如下:

public static Result save() {
Form<Product> boundForm = productForm.bindFromRequest();
if(boundForm.hasErrors()) {
flash("error", "Please correct the form below.");
return badRequest(details.render(boundForm));
}
Product product = boundForm.get();
product.save();
flash("success",String.format("Successfully added product %s", product));
return redirect(routes.Products.list());
}

同时还必须在app/views/main.scala.html的<body>标签的开头中加入实现flash scope的代码:

@if(flash.containsKey("success")){
<div class="alert alert-success">
@flash.get("success")
</div>
}
@if(flash.containsKey("error")){
<div class="alert alert-error">
@flash.get("error")
</div>
}

说明:  flash scope是用于在请求(request)的时候存储变量的一个地方,在下一次请求开始之前存储在flash scope的值一直保持着,所以flash 是flash scope用来显示失败和成功是最理想的!

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXkAAAHlCAIAAACfxRtSAAAgAElEQVR4nO3d3YsUZ77A8f2fiuxun4lIezHByEpcZIVODiiEBDcXssxcSBLaRAiRdQ5nOANeHBfTxyFysp5hmUggo6h0ModETwY1osFskvYls6ObJmt2DPZdnYvqqnqequfpfqqr6tcv8/0wF051vXVP19d66Zdf+ABQvl8MewUAbAm0BoAEWgNAAq0BIIHWAJBAawBIoDUAJNAaABJoDQAJtAaABFoDQAKtASCB1gCQQGtGRavVyjQcGC9Db02z7iXVm9FNtUZrqGsnpNWoGe+qOrxZjx+Z7MKHuZwHNOu6b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n48e+//h4uimJ4V88/L67qGDg1R2LD7/3n579IvwS8W+/2/Gx8u94WbfO/ujrw0tqzc/vv5fakfnq6x1RBX548IqylDBJ7XePf/n+V9FNSjKi8d97cE9fyo7kcFqD0TWs1vTYkenVmigxB7942v334sPv/XBWQWWCfwcNWrwqfQz1w4NXem3w7XeVXZ7VD6/uOP71ajg8/Le/+mFUkGh8NWFazu6tfqmMTGswooZ4vua7+K2NPz486NYa5Rgq/HXx4ffxcHWc6N+yrfnq6ygZWUbWGhQPN84tOfDn998LpqU1GF2jcB0qjE58yGNrjXrYFYYj3n9JjDPKrVHPHPdqjbLPEru3+mV6bV9Z/ZnWYJSNQmuupg55xrk15mOon+91h3Qr0z0C6rdfY21NamA4c1qDETWk1sQFSR0TDXIMNUqtMZ4bjq5MffW1lolijqEitAaja6jnhpXTNPG5Xu20cXDxyHBu+Pi34eQj15puWZTcKNe81Ux0LzAFdbC0Rhl+b/XL8ML5z++/p1x+ii9y0RqMrpF5LV/q9LDv+77/9OzHD79Xj6E+Dq95R+NnaE1QtLKveQesr+Vb/TAa/vVqnBJba9Rr5MnzweF8or7QGoyukTlfM3o/vEcBKBCtoTWABFpDawAJtIbWABJoDa0BJNAaWgNIKLg1lUn6fqi3Lxf74ABbWcGt2f3vn/G9lwDSCm7NjQc//fLIpQn4Pu9fHrn0f63H/e8wADcFt8b3/RsPftr975/96q1Lz9QvjuNP5e3LL8x/TmiAYhXfGgBIozUAJNAaABJoDQAJtAaABFoDQAKtASCB1gCQQGsASKA1ACTQGgASaA0ACbQGgARaA0ACrQEggdYAkEBrAJpCBKEAAAATSURBVEigNQAk0BoAEmgNAAn/DwEuuQRWCiddAAAAAElFTkSuQmCC" alt="" width="229" height="295" />

六、在列表中加入删除功能——app/views/products/list.scala.html

6.1) 在routes中加入DELETE路由

DELETE     /products/:ean      controllers.Products.delete(ean: String)

6.2) 在list.scala.html中加入JS代码,本例用JS处理Ajax请求

<h2>All products</h2>
<script>
function del(urlToDelete) {
$.ajax({
url: urlToDelete,
type: 'DELETE',
success: function(results) {
location.reload(); // Refresh the page
}
});
}
</script>
......
<tbody>
@for(product <- products){
<tr>
<td><a href="@routes.Products.details(product.ean)">@product.ean</a></td>
<td><a href="@routes.Products.details(product.ean)">@product.name</a></td>
<td><a href="@routes.Products.details(product.ean)">@product.description</a></td>
<td>
<a href="@routes.Products.details(product.ean)"><i class="fa fa-pencil"></i></a>&nbsp;&nbsp;
<a onclick="del('@routes.Products.delete(product.ean)')"><i class="fa fa-trash-o"></i></a>
</td>
</tr>
}
</tbody>
</table>
<a href="@routes.Products.newProduct()" class="btn btn-primary"><i class="fa fa-plus-circle"></i> New product</a>

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAA9MAAAFUCAIAAACoRfhbAAAgAElEQVR4nO3db3Ac5YHn8d5LFdS+okhtXR1Xeb9v9lWkNy4XRbnWq5yPBLCLQDCQQ1KMMTjxJqH2fECchJCNVthTpGBJjGLiGMoUS1lrAWMFWIOM7LB4W7JHfyYwkv8o0ViWouMUaZ1okPFzL7qn5+nup2d6NDOPunu+n+pSST3dTz8z80z3T08/3WMIAAAAAI1nrHUFAAAAgKZA8gYAAAB0IHkDAAAAOpC8AQAAAB1I3gAAAIAOJG8AAABAB5I3AAAAoAPJGwAAANCB5A0AAADoUO/kPX94R4vHrXs/LLtK36PSwnc+mwnzSLDMs3d6K+CxfsOmTZu27nj60ODkUk3PtQFW84wba/li+snvvhCBigAAAMRdnZP3xz33+aNuheitO3lLNnyj58NIpe9oJe+lD3u2t62LQEUAAACSoL7JOyD23vL9d8qstIbJu6WlZd3dzw4t1/i06ycyyXv54rt7710fgYoAAAAkRl2T94d7b1XH21ueeCs43a5t8m5pWffAix/X/NTrJDLJOzIVAQAASIx6Ju+TXV8qxdldT+y+JVz0bmTyfrTP/ejS5fOn39i7vW2dK3tHJ1lGJvBGpiIAAACJUb/kvfzWE6WofcsTby3Jf7ese+TV+YAVdSZvW/7ILqluLS07DgdVTrPIBN7IVAQAACAx6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ADQgeQNAAAA6EDyBgAAAHQgeQMAAAA6kLwBAAAAHUjeAAAAgA7/H8LLxNYS0GeKAAAAAElFTkSuQmCC" alt="" width="659" height="228" />

说明: 整个案例代码

《Play for Java》学习笔记(二)基本的CRUD应用的更多相关文章

  1. Java学习笔记二十九:一个Java面向对象的小练习

    一个Java面向对象的小练习 一:项目需求与解决思路: 学习了这么长时间的面向对象,我们只是对面向对象有了一个简单的认识,我们现在来做一个小练习,这个例子可以使大家更好的掌握面向对象的特性: 1.人类 ...

  2. 数组排序、递归——(Java学习笔记二)

    升序:      选择排序:         选定一个元素,一次和后面的元素相比较,如果选定的元素大雨后面的比较元素,就交换位置         先出现最小值,最后出现最大值. public stat ...

  3. Java学习笔记二:数据类型II

    GitHub代码练习地址:https://github.com/Neo-ML/JavaPractice/blob/master/Intpractice3.java 一  Java中的数据类型 Java ...

  4. Java学习笔记二十八:Java中的接口

    Java中的接口 一:Java的接口: 接口(英文:Interface),在JAVA编程语言中是一个抽象类型,是抽象方法的集合,接口通常以interface来声明.一个类通过继承接口的方式,从而来继承 ...

  5. Java学习笔记二十七:Java中的抽象类

    Java中的抽象类 一:Java抽象类: 在面向对象的概念中,所有的对象都是通过类来描绘的,但是反过来,并不是所有的类都是用来描绘对象的,如果一个类中没有包含足够的信息来描绘一个具体的对象,这样的类就 ...

  6. Java学习笔记二十五:Java面向对象的三大特性之多态

    Java面向对象的三大特性之多态 一:什么是多态: 多态是同一个行为具有多个不同表现形式或形态的能力. 多态就是同一个接口,使用不同的实例而执行不同操作. 多态性是对象多种表现形式的体现. 现实中,比 ...

  7. Java学习笔记二十四:Java中的Object类

    Java中的Object类 一:什么是Object类: Object类是所有类的父类,相当于所有类的老祖宗,如果一个类没有使用extends关键字明确标识继承另外一个类,那么这个类默认继承Object ...

  8. Java学习笔记二十二:Java的方法重写

    Java的方法重写 一:什么是方法的重写: 如果子类对继承父类的方法不满意,是可以重写父类继承的方法的,当调用方法时会优先调用子类的方法. 语法规则 返回值类型.方法名.参数类型及个数都要与父类继承的 ...

  9. Java学习笔记二十一:Java面向对象的三大特性之继承

    Java面向对象的三大特性之继承 一:继承的概念: 继承是java面向对象编程技术的一块基石,因为它允许创建分等级层次的类. 继承就是子类继承父类的特征和行为,使得子类对象(实例)具有父类的实例域和方 ...

  10. Java学习笔记二十:Java中的内部类

    Java中的内部类 一:什么是内部类: (1).什么是内部类呢? 内部类( Inner Class )就是定义在另外一个类里面的类.与之对应,包含内部类的类被称为外部类. (2).那为什么要将一个类定 ...

随机推荐

  1. phpcms 在后台增加了一个模型的话,在数据库中就会相应的增加数据库表

    在phpcms后台管理系统中,我们如果增加一个新的模型的话,例如名为:测试模型,英文名:test 在添加完成后,我们在数据库中发现增加了两个数据表:v9_test,v9_test_data;

  2. hibernate(三)检索属性配置

    检索即对象的获取:获取的时机和和方式:减少没必要的内存占用,尽量少的sql语句减少多余数据库的访问 一:类级别的检索:load() 和属性<class lazy=true> .无论 < ...

  3. BUAA & ICT 夏令营之旅

    我还只有二十几岁,总应该相信点什么吧. ================================ 7.10午后坐火车赶到北京.一路上火车行驶在茫茫云海里.车窗外的世界是这样子的:一片广袤的原野 ...

  4. Maven核心概念之依赖,聚合与继承

    一.依赖 我们项目中依赖的jar包可以通过依赖的方式(dependencies元素下添加dependency子元素)引入. <dependency> <groupId>juni ...

  5. C++—复合类型

    内容概要: -创建和使用数组 -创建和使用C-风格字符串 -创建和使用string类字符串 -使用方法getline()和get()读取字符串 -混合输入字符串和数字 -创建和使用结构 -创建和使用共 ...

  6. golang csv,xls,xlsx

    要用到的包: "golang.org/x/text/encoding/simplifiedchinese"    "golang.org/x/text/transform ...

  7. java获取客户访问IP

    原文:http://blog.csdn.net/mydwr/article/details/9357187 /** * 获取访问者IP * * 在一般情况下使用Request.getRemoteAdd ...

  8. Nginx 启用gzip压缩

    1. 网页压缩 网页压缩是一项由 WEB 服务器和浏览器之间共同遵守的协议,也就是说 WEB 服务器和浏览器都必须支持该技术,所幸的是现在流行的浏览器都是支持的,包括 IE.FireFox.Opera ...

  9. android打开,保存图片到sd卡,显示图片

    1.打开根目录下test.jpg Bitmap bm = BitmapFactory.decodeFile(Environment.getExternalStorageDirectory().getA ...

  10. commonJS — 事件处理(for Event)

    for Event github: https://github.com/laixiangran/commonJS/blob/master/src/forEvent.js 代码 (function(w ...