编写model层:
package com.example.demospringboot.domain; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; //User类主要用于Java数据和数据库表的映射 @Data @AllArgsConstructor @NoArgsConstructor public class User { private String id; private String username; private String password; private String phone; private int isDelete; }
package com.example.demospringboot.dto; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; //登录模块数据传输对象 @Data @AllArgsConstructor @NoArgsConstructor public class UserLoginDto { private String username; private String password; }
package com.example.demospringboot.dto; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; //注册模块数据传输对象 @Data @AllArgsConstructor @NoArgsConstructor public class UserRegisterDto { private String username; private String password; private String phone; }
标签:选题,包杯,String,NoArgsConstructor,private,AllArgsConstructor,进度,import,lombok From: https://www.cnblogs.com/psh888/p/17274486.html