Skip to content

Commit a6474a6

Browse files
committed
adding lombok and annotation processing order
1 parent b45efad commit a6474a6

File tree

3 files changed

+26
-71
lines changed

3 files changed

+26
-71
lines changed

pom.xml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@
9999
<groupId>io.micronaut.liquibase</groupId>
100100
<artifactId>micronaut-liquibase</artifactId>
101101
</dependency>
102+
<dependency>
103+
<groupId>org.projectlombok</groupId>
104+
<artifactId>lombok</artifactId>
105+
</dependency>
102106
</dependencies>
103107

104108
<build>
@@ -111,24 +115,20 @@
111115
<plugin>
112116
<groupId>org.apache.maven.plugins</groupId>
113117
<artifactId>maven-compiler-plugin</artifactId>
114-
<configuration>
115-
<!-- Uncomment to enable incremental compilation -->
116-
<!-- <useIncrementalCompilation>false</useIncrementalCompilation>-->
117-
118-
<annotationProcessorPaths combine.children="append">
119-
<path>
120-
<groupId>io.micronaut</groupId>
121-
<artifactId>micronaut-http-validation</artifactId>
122-
<version>${micronaut.version}</version>
123-
</path>
124118

119+
<configuration>
120+
<annotationProcessorPaths>
125121
<path>
126-
<groupId>io.micronaut.data</groupId>
127-
<artifactId>micronaut-data-processor</artifactId>
128-
<version>3.4.2</version>
122+
<groupId>org.projectlombok</groupId>
123+
<artifactId>lombok</artifactId>
124+
<version>1.18.24</version>
129125
</path>
130-
131-
</annotationProcessorPaths>
126+
<path>
127+
<groupId>io.micronaut</groupId>
128+
<artifactId>micronaut-inject-java</artifactId>
129+
<version>${micronaut.version}</version>
130+
</path>
131+
</annotationProcessorPaths>
132132
<compilerArgs>
133133
<arg>-Amicronaut.processing.group=com.example</arg>
134134
<arg>-Amicronaut.processing.module=demo</arg>
Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package com.example.model;
22

3+
import lombok.Data;
4+
import lombok.Getter;
5+
import lombok.Setter;
36
import org.hibernate.annotations.BatchSize;
47

58
import javax.persistence.Column;
@@ -12,27 +15,12 @@
1215
@Entity
1316
@Table(name = "authors")
1417
@BatchSize(size = 10)
18+
@Getter
19+
@Setter
1520
public class Author {
1621
@Id
1722
@GeneratedValue(strategy = GenerationType.IDENTITY)
1823
Long id;
1924
@Column(name = "full_name")
2025
String name;
21-
22-
public Long getId() {
23-
return id;
24-
}
25-
26-
public void setId(Long id) {
27-
this.id = id;
28-
}
29-
30-
public String getName() {
31-
return name;
32-
}
33-
34-
public void setName(String name) {
35-
this.name = name;
36-
}
37-
3826
}
Lines changed: 6 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
package com.example.model;
22

3+
import lombok.Data;
4+
import lombok.Getter;
5+
import lombok.Setter;
6+
37
import javax.persistence.*;
48

59
@Entity
610
@Table(name = "books")
11+
@Getter
12+
@Setter
713
public class Book {
814
@Id
915
@GeneratedValue(strategy = GenerationType.IDENTITY)
@@ -24,43 +30,4 @@ public Book(String title, int pages) {
2430
public Book() {
2531
}
2632

27-
public Long getId() {
28-
return id;
29-
}
30-
31-
public void setId(Long id) {
32-
this.id = id;
33-
}
34-
35-
public String getTitle() {
36-
return title;
37-
}
38-
39-
public void setTitle(String title) {
40-
this.title = title;
41-
}
42-
43-
public int getPages() {
44-
return pages;
45-
}
46-
47-
public void setPages(int pages) {
48-
this.pages = pages;
49-
}
50-
51-
public int getYear() {
52-
return year;
53-
}
54-
55-
public void setYear(int year) {
56-
this.year = year;
57-
}
58-
59-
public Author getAuthor() {
60-
return author;
61-
}
62-
63-
public void setAuthor(Author author) {
64-
this.author = author;
65-
}
6633
}

0 commit comments

Comments
 (0)