Micronaut

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

How to avoid AWS SAM rebuild and reupload a gradle function with unchanged code?

ぐ巨炮叔叔 提交于 2021-01-02 20:30:09
问题 I'm developing an application with micronaut using SAM CLI to deploy it on AWS Lambda. As I was including dependencies and developing new features, the function packages got bigger an bigger (now they are around 250MB). This makes deployment take a while. On top of that every time I edit template.yaml and then run sam build && sam deploy to try a new configuration on S3, RDS, etc... I have to wait for gradle to build the function again (even though it's unchanged since the last deployment)

How to store JSON object into PostgreSQL using JSONB data type inside table and PostgreSQL JDBC driver

喜夏-厌秋 提交于 2021-01-02 06:46:06
问题 I want to save following json object into PostgreSQL db table as jsonb { "fname":"john", "lname:"doe", } I am currenlty using PGObject to create object and set type to jsonb and pass value as json string Looking for a better approach with micronaut-data and micronaut Is there any native data type supported in micronaut-data to convert the Java object to JSON and store in db? How to save the data using postgres jdbc driver typecasting in query using :jsonb is already tried with raw jdbc if it

How do I resolve error “No bean of type [io.micronaut.data.operations.PrimaryRepositoryOperations] exists” in micronaut application?

谁都会走 提交于 2020-12-10 07:12:41
问题 I am evaluating micronaut and am attempting to port a small application as a pilot project. I have run into a snag dealing with datasources/repositories. I have the following application.yml: micronaut: application: name: bling-application datasources: default: url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE driverClassName: org.h2.Driver username: sa password: '' schema-generate: CREATE_DROP dialect: H2 jpa: default: entity-scan: packages: 'my.package.entity'

IDEA 2020.2 稳定版发布,带来了不少新功能...

…衆ロ難τιáo~ 提交于 2020-08-11 07:05:45
IntelliJ IDEA 2020.2 稳定版已发布,此版本带来了不少新功能,包括支持在 IDE 中审查和合并 GitHub PR、新增加的 Inspections 小组件(Inspections Widget)支持在文件的警告和错误之间快速导航、使用 Problems 工具窗口查看当前文件中的完整问题列表,并在更改会破坏其他文件时收到通知。 此外还有针对部分框架和技术的新功能,包括支持使用 Jakarta EE 9 以及改进对 Quarkus, Micronaut, Amazon SQS API 和 OpenAPI 的支持(适用于旗舰版)。 新版下载地址: https://www.jetbrains.com/idea/download Java 支持 Java 15:更新对 Records 功能的支持,还增加了对 Sealed 类的基本支持。当然也提供了对文本块(Text Blocks)的全面支持 来源: oschina 链接: https://my.oschina.net/u/4399511/blog/4480242

Is it possible prevent copying of resources to build directory in Gradle project and directly use them from original location?

匆匆过客 提交于 2020-07-22 11:11:20
问题 I come from Grails background and there was a feature where our changes to CSS, HTML & JS files were instant and didn't needed rebuilding code again. Now, while building a Micronaut project I would like to have something similar but I am unable to figure how to configure Gradle for same. Till now, I found out if I make changes to copied resources inside build folder, changes are reflected on browser and don't require rebuilding code but this forces me to do changes to original file later. Can

Problem with creating AWS Lambda function using Micronaut and GraalVM

♀尐吖头ヾ 提交于 2020-07-22 10:09:12
问题 I'm trying to create and deploy AWS Lambda function in Java using Micronaut, GraalVM, and Docker. I'm following this tutorial to create AWS lambda with GraalVM runtime. I've created java project using micronaut command $ mn create-app my-app --features aws-api-gateway-graal . And then without any change in code or config files, try to build a Docker image with GraalVM native image. In the step of docker build when graalvm native image is building I get these warnings: Warning: Aborting stand