Questions tagged [micronaut]

Micronaut is a JVM framework for building web applications with a strong focus on microservice applications.

Micronaut is an open source framework for the JVM designed for rapid development of web applications, particularly microservices. Micronaut supports building applications in Java, Groovy, and Kotlin.

1684 questions
5
votes
1 answer

How to populate database before running tests with Micronaut

I'm looking for a way to execute some SQL scripts before my test class is executed. With Spring I can easily annotate my test class (or test method) with the @Sql annotation. I haven't found any particular way to do the same with Micronaut. The…
5
votes
1 answer

jOOQ DSLContext Bean not being created in Micronaut project

I'm trying to use jOOQ in my Micronaut application, and have the jOOQ DSLContext automatically provided as an injected bean to my constructor, but it is failing to find the bean. I've configured my datasources in my application.yml to connect to my…
beerye
  • 253
  • 3
  • 15
5
votes
2 answers

Micronaut and Java Mail API

We are trying to migrate parts of our monolith to microservices and we decided to go with micronaut. We are extracting now an email service which given some inputs will render email and talk with an SMTP server to send them. For that, we use Java…
George Karanikas
  • 1,244
  • 1
  • 12
  • 38
5
votes
1 answer

Create multiple HTTP clients with same interface

We need to be able to connect to multiple Elasticsearch servers. We have a simple Elasticsearch client, defined with the declarative approach of Micronaut. However, being a multi-tenant environment, we need to be able to define many such clients.…
Luis Muñiz
  • 4,649
  • 1
  • 27
  • 43
5
votes
1 answer

How to accept custom HTTP error codes with the Micronaut client?

I'm setting up an HTTP client to an external API. That server has unusual status codes in case of errors in the payload sent (310 to 323). However, Micronaut's HTTP client throws an IllegalArgumentException when trying to parse that response, due to…
5
votes
0 answers

Micronaut - Kotlin code compilation with Maven

I have started to work on a Micronaut REST microservice, with Kotlin and Maven, and I have a hard time at trying to get the better build process possible with this stack in Intellij. I was expecting Kotlin to be easily compatible with Micronaut, but…
Bastien7
  • 250
  • 3
  • 7
5
votes
0 answers

How to handle multipart/form-data file uploads using micronaut-function-aws-api-proxy

I'm using micronaut 1.1.0.RC2 and micronaut-function-aws-api-proxy 1.1.0.RC3 within an AWS API Gateway proxy to a Kotlin Lambda function. The micronaut aws api proxy works fine for all of my API functions except for the file upload route. Class and…
5
votes
1 answer

How to create a micronaut AWS Lambda function triggered using an S3Event?

I looked at the micronaut documentation at https://docs.micronaut.io/latest/guide/index.html#functionBean and all examples assume events are coming from API Gateway and the request body is sent out as a POJO. Can Micronaut also support S3Event and…
simon
  • 559
  • 1
  • 6
  • 19
5
votes
1 answer

Micrornaut. Logger configuration for an environment

I'm trying out the micronaut-framework (1.0.1) and wondering whether there is a possibility to configure some logger for a cerntain environment like I did it in spring boot: I.e for the environment (profile) prod I wannt this logger configuration.…
Roman T
  • 1,400
  • 5
  • 18
  • 31
5
votes
4 answers

Micronaut: How to get metrics in the Prometheus format?

How should I configure the Micronaut to get the /metrics in the Prometheus format ? Used: micronaut 1.0.0.M3 Now: micronaut: ... metrics: enabled: true export: prometheus: enabled: true and result: metrics name…
Avbat
  • 81
  • 1
  • 7
5
votes
1 answer

Using @Transactional in Micronaut without using Hibernate

Micronaut has support for JDBC, and the guide states that @Transactional from micronaut-spring can be used for AOP style transaction handling. I can't get this to work, when using @Transaction with a plain datasource, I get an exception that no…
phXql
  • 197
  • 1
  • 11
4
votes
1 answer

Heroku process crashing as soon as the process starts

I have a simple Micronaut server I am trying to launch on Heroku by building it with a heroku.yml but for some reason when I check the logs the process exits as soon as it starts. The docker image runs just fine locally and nothing else prints out…
Kilbo
  • 333
  • 1
  • 12
4
votes
1 answer

GraalVM native image not working with logs

What I try to do: mvn package -Dpackaging=docker-native -Dmicronaut.runtime=lambda -Pgraalvm what I get: Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of org.apache.logging.slf4j.SLF4JLogger are…
Spica
  • 63
  • 6
4
votes
0 answers

Micronaut - Error encoding object to JSON: No serializer found for class io.netty.handler.codec.http.cookie.ServerCookieEncoder

Using Micronaut micronautVersion=3.4.3 getting an below exception for the below code @Validated public interface ICategoryOperation { @Get(value = "/{?searchCriteria*}") @Secured(SecurityRule.IS_ANONYMOUS) Flux get(CategoryFilterModel…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
4
votes
1 answer

How do I disable the http server in a micronaut application

I have a micronaut application that is supposed to run a SQS listener in one container and a regular HTTP server on the other. How do I achieve this via configuration? I can use the following app properties to enable/disable the…