Skip to content

Model command

José Vieira Neto edited this page Aug 4, 2019 · 2 revisions

This command have the goal generate models with jpa orm

How to use

spring model -n "User" -p "name:String email:String"

output

[INFO] org.projectlombok already added.
CREATED src/main/java/com/example/cloudawsmessaging/models/User.java

content

import lombok.Data;
import java.util.List;

@Entity
@Data
public class User {

        @Id @GeneratedValue(strategy = GenerationType.AUTO)
        private Integer id;
        private String name;
        private String email;
}
Clone this wiki locally