- 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.
推薦閱讀
- Web程序設(shè)計(jì)及應(yīng)用
- 網(wǎng)頁設(shè)計(jì)與制作教程(HTML+CSS+JavaScript)(第2版)
- Vue.js 3.0源碼解析(微課視頻版)
- The React Workshop
- Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API
- TypeScript項(xiàng)目開發(fā)實(shí)戰(zhàn)
- Python Data Analysis Cookbook
- Machine Learning in Java
- Statistical Application Development with R and Python(Second Edition)
- 移動(dòng)增值應(yīng)用開發(fā)技術(shù)導(dǎo)論
- Django實(shí)戰(zhàn):Python Web典型模塊與項(xiàng)目開發(fā)
- JavaScript程序設(shè)計(jì):基礎(chǔ)·PHP·XML
- Python大規(guī)模機(jī)器學(xué)習(xí)
- Python Programming for Arduino
- 零基礎(chǔ)學(xué)Java第2版