data-generator
Getting started
Gradle
implementation 'com.github.lejeanbono:data-generator-core:0.3.2'
implementation 'com.github.lejeanbono:data-generator-mongodb:0.3.2'
Maven
<!-- replace here with the latest version -->
<dependency>
<groupId>com.github.lejeanbono</groupId>
<artifactId>data-generator-core</artifactId>
<version>0.3.2</version>
</dependency>
<dependency>
<groupId>com.github.lejeanbono</groupId>
<artifactId>data-generator-mongodb</artifactId>
<version>0.3.2</version>
</dependency>
Activation
Add @EnableDataGenerator
and import DataGeneratorMongoDBConfig
@EnableDataGenerator
@SpringBootApplication
@Import(DataGeneratorMongoDBConfig.class)
public class EApplication {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
In your application.properties
:
datagenerator.pluralRessources=true
Use
Add @TestData
on bean to give you access at the API
@TestData
public class MyEntity {
@Id
private String id;
private String name;
}