我有一個用戶和UserDTO類,但在dto類我不想用戶LocalDateTime,我想將其轉換爲長類型。 (因爲protobuf不支持日期)。因此,在代碼: 我的用戶實體類: public class User {
private String name,password;
private LocalDateTime date;
//getters-setters, tost
我正在研究java spring mvc應用程序,並且有一個關於將視圖模型對象映射到數據庫模型對象的重要問題。我們的應用程序爲此使用dozer mapper。 假設我有一個人模型和BaseInformation模型。 BaseInformation模型適用於所有其他模型可以使用的一般數據,例如性別,顏色,單位,...。 BaseInformation: class BaseInformation{