2015年10月28日
摘要: 程序以及基本可用了,需要继续完善页面1.创建页面模板创建文件app/views/tags/display.html*{ Display a post in one of these modes: 'full', 'home' or 'teaser' }* ${_post.ti... 阅读全文
posted @ 2015-10-28 14:42 alex_cool 阅读(858) 评论(0) 推荐(0) 编辑
摘要: 上一篇最后出现的错误是因为断言assertEquals(1, Post.count()); 出错,取到的Post的数量不是1,运行Test之前,表中有数据可以添加以下方法,运行Test前清空数据@Beforepublic void setup() { Fixtures.deleteAll();} ... 阅读全文
posted @ 2015-10-28 14:12 alex_cool 阅读(784) 评论(0) 推荐(0) 编辑
摘要: 1.添加Post类package models;import java.util.*;import javax.persistence.*;import play.db.jpa.*;@Entity@Table(name = "blog_post")public class Post extends ... 阅读全文
posted @ 2015-10-28 11:35 alex_cool 阅读(509) 评论(0) 推荐(0) 编辑
摘要: 1.开发DataModel在app\moders 下新建User.javapackage models;import java.util.*;import javax.persistence.*;import play.db.jpa.*;@Entitypublic class User extend... 阅读全文
posted @ 2015-10-28 10:48 alex_cool 阅读(602) 评论(0) 推荐(0) 编辑
摘要: A blogengine projectyabe.1.创建工程>play new yabe 设置Application Name:Yet Another Blog Engine. 2.创建Eclipse配置文件>play eclipsify yabe导入Eclipse3.修改index.html#{... 阅读全文
posted @ 2015-10-28 10:20 alex_cool 阅读(702) 评论(0) 推荐(0) 编辑