Skip to content

Commit

Permalink
Switch to use Serde for the Discovery consul guide (micronaut-project…
Browse files Browse the repository at this point in the history
  • Loading branch information
timyates authored Nov 10, 2022
1 parent 2004eff commit 3febca2
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package example.micronaut
import groovy.transform.CompileStatic
import groovy.transform.EqualsAndHashCode
import io.micronaut.core.annotation.Creator
import io.micronaut.core.annotation.Introspected
import io.micronaut.core.annotation.NonNull
import io.micronaut.serde.annotation.Serdeable

import javax.validation.constraints.NotBlank

@CompileStatic
@EqualsAndHashCode
@Introspected
@Serdeable
class Book {

@NonNull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package example.micronaut;

import io.micronaut.core.annotation.Introspected;
import io.micronaut.core.annotation.NonNull;
import io.micronaut.serde.annotation.Serdeable;

import javax.validation.constraints.NotBlank;
import java.util.Objects;

@Introspected
@Serdeable
public class Book {

@NonNull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package example.micronaut

import io.micronaut.core.annotation.Introspected
import io.micronaut.serde.annotation.Serdeable
import javax.validation.constraints.NotBlank

@Introspected
@Serdeable
data class Book(@NotBlank val isbn: String,
@NotBlank val name: String)
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package example.micronaut

import groovy.transform.CompileStatic
import groovy.transform.EqualsAndHashCode
import io.micronaut.core.annotation.Introspected
import io.micronaut.core.annotation.NonNull
import io.micronaut.serde.annotation.Serdeable

import javax.validation.constraints.NotBlank

@CompileStatic
@EqualsAndHashCode
@Introspected
@Serdeable
class BookInventory {

@NonNull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package example.micronaut;

import io.micronaut.core.annotation.Introspected;
import io.micronaut.core.annotation.NonNull;
import io.micronaut.serde.annotation.Serdeable;

import javax.validation.constraints.NotBlank;
import java.util.Objects;

@Introspected
@Serdeable
public class BookInventory {

@NonNull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package example.micronaut

import io.micronaut.core.annotation.Introspected
import io.micronaut.serde.annotation.Serdeable
import javax.validation.constraints.NotBlank

@Introspected
@Serdeable
data class BookInventory(@NotBlank val isbn: String,
val stock: Int)
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package example.micronaut

import groovy.transform.CompileStatic
import groovy.transform.EqualsAndHashCode
import io.micronaut.core.annotation.Introspected
import io.micronaut.core.annotation.NonNull
import io.micronaut.serde.annotation.Serdeable

import javax.validation.constraints.NotBlank

@CompileStatic
@EqualsAndHashCode
@Introspected
@Serdeable
class Book {

@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package example.micronaut

import groovy.transform.CompileStatic
import groovy.transform.EqualsAndHashCode
import io.micronaut.core.annotation.Introspected
import io.micronaut.core.annotation.NonNull
import io.micronaut.serde.annotation.Serdeable

import javax.validation.constraints.NotBlank

@CompileStatic
@EqualsAndHashCode
@Introspected
@Serdeable
class BookRecommendation {

@NonNull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package example.micronaut;

import io.micronaut.core.annotation.Introspected;
import io.micronaut.core.annotation.NonNull;
import io.micronaut.serde.annotation.Serdeable;

import javax.validation.constraints.NotBlank;
import java.util.Objects;

@Introspected
@Serdeable
public class Book {

@NonNull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package example.micronaut;

import io.micronaut.core.annotation.Introspected;
import io.micronaut.core.annotation.NonNull;
import io.micronaut.serde.annotation.Serdeable;

import javax.validation.constraints.NotBlank;

@Introspected
@Serdeable
public class BookRecommendation {

@NonNull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package example.micronaut

import io.micronaut.core.annotation.Introspected
import io.micronaut.serde.annotation.Serdeable
import javax.validation.constraints.NotBlank

@Introspected
@Serdeable
data class Book(@NotBlank val isbn: String,
@NotBlank val name: String)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package example.micronaut

import io.micronaut.core.annotation.Introspected
import io.micronaut.serde.annotation.Serdeable
import javax.validation.constraints.NotBlank

@Introspected
@Serdeable
data class BookRecommendation(@NotBlank val name: String)
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
"apps": [
{
"name": "bookcatalogue",
"features": ["discovery-consul", "management", "graalvm"]
"features": ["discovery-consul", "management", "graalvm", "serialization-jackson"]
},
{
"name": "bookinventory",
"features": ["discovery-consul", "management", "graalvm"]
"features": ["discovery-consul", "management", "graalvm", "serialization-jackson"]
},
{
"name": "bookrecommendation",
"features": ["discovery-consul", "management", "graalvm", "reactor"]
"features": ["discovery-consul", "management", "graalvm", "reactor", "serialization-jackson"]
}
]
}

0 comments on commit 3febca2

Please sign in to comment.