<dependency> <groupId>io.sundr</groupId> <artifactId>sundrio-annotations</artifactId> <version>1.2.1</version> </dependency> import io.sundr.builder.annotations.Buildable; @Buildable public @interface ExampleAnnotation { String name() default ""; String description() default ""; } <plugin> <groupId>io.sundr.builder</groupId> <artifactId>sundr-builder-generator-maven-plugin</artifactId> <version>2.3.0</version> <executions> <execution> <goals> <goal>generate</goal> </goals> <phase>generate-sources</phase> </execution> </executions> <configuration> <packages> <package>com.example.annotations</package> </packages> </configuration> </plugin> ExampleAnnotation exampleAnnotation = new ExampleAnnotationBuilder() .withName("example") .withDescription("This is an example annotation") .build();


上一篇:
下一篇:
切换中文