File tree Expand file tree Collapse file tree 2 files changed +4
-27
lines changed
src/main/java/io/tpd/kafkaexample Expand file tree Collapse file tree 2 files changed +4
-27
lines changed Original file line number Diff line number Diff line change 14
14
<parent>
15
15
<groupId>org.springframework.boot</groupId>
16
16
<artifactId>spring-boot-starter-parent</artifactId>
17
- <version>2.4.3 </version>
17
+ <version>2.5.5 </version>
18
18
<relativePath/> <!-- lookup parent from repository -->
19
19
</parent>
20
20
21
21
<properties>
22
22
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23
23
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24
- <java.version>15 </java.version>
24
+ <java.version>17 </java.version>
25
25
</properties>
26
26
27
27
<dependencies>
Original file line number Diff line number Diff line change 2
2
3
3
import com.fasterxml.jackson.annotation.JsonProperty;
4
4
5
- public class PracticalAdvice {
6
- private final String message;
7
- private final int identifier;
8
-
9
- public PracticalAdvice(@JsonProperty("message") final String message,
10
- @JsonProperty("identifier") final int identifier) {
11
- this.message = message;
12
- this.identifier = identifier;
13
- }
14
-
15
- public String getMessage() {
16
- return message;
17
- }
18
-
19
- public int getIdentifier() {
20
- return identifier;
21
- }
22
-
23
- @Override
24
- public String toString() {
25
- return "PracticalAdvice::toString() {" +
26
- "message='" + message + '\'' +
27
- ", identifier=" + identifier +
28
- '}';
29
- }
5
+ record PracticalAdvice(@JsonProperty("message") String message,
6
+ @JsonProperty("identifier") int identifier) {
30
7
}
You can’t perform that action at this time.
0 commit comments