- Spring 5.0 By Example
- Claudio Eduardo de Oliveira
- 104字
- 2021-06-24 19:17:34
News
This class represents news in our domain, for now, it does not have any behaviors. Only properties and getters/setters are exposed; in the future, we will add some behaviors:
package springfive.cms.domain.models;
import java.util.Set;
import lombok.Data;
@Data
public class News {
String id;
String title;
String content;
User author;
Set<User> mandatoryReviewers;
Set<Review> reviewers;
Set<Category> categories;
Set<Tag> tags;
}
The Review class can be found at GitHub: (https://github.com/PacktPublishing/Spring-5.0-By-Example/tree/master/Chapter02/src/main/java/springfive/cms/domain/models).
As we can see, they are simple Java classes which represent our CMS application domain. It is the heart of our application, and all the domain logic will reside in these classes. It is an important characteristic.
推薦閱讀
- 深入核心的敏捷開發:ThoughtWorks五大關鍵實踐
- Expert C++
- Ceph Cookbook
- 新一代通用視頻編碼H.266/VVC:原理、標準與實現
- React Native Cookbook
- 深入淺出Windows API程序設計:編程基礎篇
- 編寫高質量代碼:改善C程序代碼的125個建議
- The DevOps 2.4 Toolkit
- Windows Forensics Cookbook
- Docker:容器與容器云(第2版)
- Java程序設計實用教程(第2版)
- C# 7.0本質論
- 計算機應用基礎(Windows 7+Office 2010)
- C#從入門到精通(微視頻精編版)
- 大象:Thinking in UML(第二版)