micronaut-rest

Validating the POJO record with Micronaut not working

那年仲夏 提交于 2021-01-29 09:04:43
问题 Using Micronaut bean validation for the record class is not working compile 'io.micronaut:micronaut-validation:2.2.1' Record class @Introspected public record ProductViewModel ( @JsonProperty("id") String id, @JsonProperty("name") @NotBlank @NotNull String name, @JsonProperty("description") @NotBlank String description, @JsonProperty("price") @NotBlank float price ) { } CURL curl --location --request POST 'http://localhost:8084/api/v1/product' \ --header 'Content-Type: application/json' \ -

Reactive and Non-Blocking Method Micronaut with apache kafka

守給你的承諾、 提交于 2021-01-19 08:29:49
问题 I am trying to get the Non-Blocking response from the Micronaut kafka implementation, however the return value in not working. public class ProductManager implements IProductManager{ private final ApplicationContext applicationContext; public ProductManager(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } @Override public ProductViewModel findFreeText(String text) { final ProductViewModel model = new ProductViewModel(); IProductProducer client =

Reactive and Non-Blocking Method Micronaut with apache kafka

橙三吉。 提交于 2021-01-19 08:28:30
问题 I am trying to get the Non-Blocking response from the Micronaut kafka implementation, however the return value in not working. public class ProductManager implements IProductManager{ private final ApplicationContext applicationContext; public ProductManager(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } @Override public ProductViewModel findFreeText(String text) { final ProductViewModel model = new ProductViewModel(); IProductProducer client =

Custom Security Rules not working Micronaut 2.2.1

杀马特。学长 韩版系。学妹 提交于 2021-01-05 08:59:46
问题 I am trying to implement the custom security rules with Micronaut 2.2.1, but it is not working. public @interface RequiredPermission { String resourceIdName(); String permission(); } Security Rules @Singleton public class AdminRequirement implements SecurityRule { @Override public SecurityRuleResult check(HttpRequest<?> request, @Nullable RouteMatch<?> routeMatch, @Nullable Map<String, Object> claims) { if (routeMatch instanceof MethodBasedRouteMatch) { MethodBasedRouteMatch