- 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.
推薦閱讀
- Mastering NetBeans
- DevOps for Networking
- PyQt從入門到精通
- Wireshark Network Security
- 自然語言處理Python進(jìn)階
- 移動界面(Web/App)Photoshop UI設(shè)計(jì)十全大補(bǔ)
- Getting Started with LLVM Core Libraries
- 區(qū)塊鏈技術(shù)進(jìn)階與實(shí)戰(zhàn)(第2版)
- Java EE企業(yè)級應(yīng)用開發(fā)教程(Spring+Spring MVC+MyBatis)
- Swift語言實(shí)戰(zhàn)晉級
- 代碼閱讀
- 零基礎(chǔ)學(xué)Python編程(少兒趣味版)
- Python計(jì)算機(jī)視覺和自然語言處理
- 硬件產(chǎn)品設(shè)計(jì)與開發(fā):從原型到交付
- 官方 Scratch 3.0 編程趣味卡:讓孩子們愛上編程(全彩)