- 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.
推薦閱讀
- Learning Docker
- SQL for Data Analytics
- Learning Bayesian Models with R
- Selenium Design Patterns and Best Practices
- 軟件架構:Python語言實現
- Spring Boot Cookbook
- Nginx實戰:基于Lua語言的配置、開發與架構詳解
- Java系統化項目開發教程
- 新一代SDN:VMware NSX 網絡原理與實踐
- 動手學數據結構與算法
- INSTANT Yii 1.1 Application Development Starter
- Django實戰:Python Web典型模塊與項目開發
- 貫通Tomcat開發
- Visual Basic語言程序設計上機指導與練習(第3版)
- Effective C++:改善程序與設計的55個具體做法(第三版)中文版(雙色)