Package: plaster-spring-boot
Project to bring similar functionality found in Rails to the Spring Boot
platform. Currently only supports maven-enabled projects.For Example:plaster g scaffold User name:string age:integerWill create the following files:Model - root/model/User.javaRepository - root/repository/UserRepository.javaService - service/UserService.javaController - controller/UsersController.javaThe root is calculated upon script start. For example, if being run on a
project with the following inpom.xml:<groupId>com.example</groupId>the root will besrc/main/com/example/InstallationIf you havepipinstalled, you can install Plaster with following:pip install plaster-spring-bootOtherwise, ensure Python’ssetuptoolsis installed to install
Plaster. If on an ubuntu system, use the following:sudo apt-get install python-setuptoolsOtherwise, exploresetuptoolsto find how to
install for your system. Then download Plaster onto your machine,
navigate to the directory in which it was downloaded and run:python setup.py installUsageusage: plaster [-h] [-v] [-k [KEY]] [-d DIR]
               {generate,g,delete,d}
               {scaffold,model,repository,service,controller,field} model_name
               [fields [fields ...]]

Generate files for Spring Boot

positional arguments:
  {generate,g,delete,d}
                        whether to generate or delete
                            generate, g - create files
                            delete, d - remove files
  {scaffold,model,repository,service,controller,field}
                        how to generate or delete content
                            scaffold - all files associated to the model
                            model - the entire model
                            repository - the entire repository
                            service - the entire service
                            controller - the entire controller
                            field - individual field(s)
  model_name            name of model for which to perform actions
  fields                fields to perform actions listed as name:type pairs

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         fetches the current version of the tool
  -k [KEY], --key [KEY]
                        indicates the following field:type pair should define the key
                        NOTE: should be a trailing param
  -d DIR, --dir DIR     defines a sub path in which to perform actions
                        NOTE: should be a trailing paramCustomizationPer default, Plater will auto-discover necessary configurations and then
use best-practices to decide where and how to generate files. However,
if you would like to customize the generation of the files, Plater gives
you the ability to alter defaults by placingplaster.ymlin the root
of the project. The following configurations are supported:PropertydirPropertyDescriptionTypeDefaultmodelDirectory in which to generate modelsStringmodelrepositoryDirectory in which to generate repositoriesStringrepositorycontrollerDirectory in which to generate controllersStringcontrollerserviceDirectory in which to generate servicesStringservicePropertylombokPropertyDescriptionTypeDefaultenabledShould we enable generation in lombok
modeBooleanIs lombok
a
dependenc
y
inpom.xml?Lombok SupportGeneration of models will change if a lombok dependency is found inpom.xml. This will import lombok and annotate the model differently.
For example://NO LOMBOK
@Entity
public class Example {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Integer id;

    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

}import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@Builder
@Data
@NoArgsConstructor
public class Example {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Integer id;

}For lombok information, visit the project’shomepage.