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
9
votes
2 answers

Can I use spring data jpa with Micronaut?

I would like to extend my TestRepository interface with JpaRepository and utilize the features such as jpa method queries, paging and sorting without manually defining entity manager bean and without writing any sql. P.S. In micronaut project
Khwaja Sanjari
  • 455
  • 5
  • 17
9
votes
2 answers

Can you alter a Micronaut App features from the command line?

I created a new Micronaut from the CLI and tinkered around a bit then realized that I could add features from the cli but it seems to only be an option when calling create-app. Is there a way to add features from the command line after the app has…
lees2bytes
  • 296
  • 2
  • 9
8
votes
5 answers

Micronaut configure logger appenders based of the enviroment

I would like to configure logging appender based on the environment, for example while running in production I would like to configure an appender that would send log to elasticsearch but while on test or development mode this appender would not be…
Luis Trigueiros
  • 636
  • 7
  • 21
8
votes
2 answers

How do you run micronaut from gradle with local properties

I want to run Micronaut server from Gradle command line with "local" environment variables. The regular command .\gradlew.bat run will use default variables defined in application.yml file. I want to override some of them with values for my local…
Aziris
  • 157
  • 2
  • 9
8
votes
3 answers

Micronaut serverless application using DynamoDB and Graal custom runtime throws Cannot construct instance of com.amazonaws.partitions.model.Partitions

SAMPLE PROJECT AVAILABLE HERE: https://github.com/codependent/micronaut-aws-lambda-proxy-graal I have a Micronaut application deployed on Amazon AWS as a Lambda function. It is compiled into a GraalVM native image and run using an AWS Lambda Custom…
codependent
  • 23,193
  • 31
  • 166
  • 308
8
votes
2 answers

Swagger for Micronaut with maven

I want to switch to the Micronaut framework from Spring Boot 2. And I am struggling with the Swagger settings. In Spring Boot 2 project I have the following dependencies: io.springfox
Evgeny Mamaev
  • 1,237
  • 1
  • 14
  • 31
8
votes
3 answers

How can I install Micronaut CLI?

I cannot find in the Micronaut documentation a way to install mn CLI. There many usage examples, but not a how to install it.
7
votes
2 answers

How to mock a service with spock in micronaut when testing a rabbit consumer?

I'm currently working with: Micronaut 3.7.3 RabbitMQ 3.11.2 Spock Groovy / Java 17 I'm implementing a rabbitmq consumer for a simple demo project following the guidelines from micronaut project…
ada-stack
  • 73
  • 4
7
votes
1 answer

Micronaut: How to print traceId and spanId in logs?

I've been using Spring Boot for a long time. I'm working on Micronaut now. I'm used to using Sleuth to print trace and span IDs automatically on logs. What is the sleuth equivalent in Micronaut? If there is no equivalent, how to print the trace and…
Anoop Hallimala
  • 625
  • 1
  • 11
  • 25
7
votes
2 answers

What is the most cost-effective way to run a Java based API back-end (Spring Boot, Micronaut, Quarkus) on GCP?

I have a mobile app where the back-end is currently running as a NodeJS Cloud Function, but I'm nowhere near as comfortable with NodeJS as I am with Java. So, I've re-written the API in Java - however, when it comes to deploying that as a Cloud…
cloudwalker
  • 2,346
  • 1
  • 31
  • 69
7
votes
1 answer

GraalVM native-image jvm metrics

When running a native-image of a Micronaut application retrieving Prometheus metrics fails because it cannot get jvm metrics. Of course native-image pre-compiles the application and includes only what's actually being used, but what kind of JVM is…
7
votes
1 answer

Micronaut environments and logback profiles

How to write logback.xml for Micronaut, like Spring Boot: https://www.logicbig.com/tutorials/spring-framework/spring-boot/profile-logback-logging-config.html I think springProfile doesn't exist in Micronaut. I have Micronaut environments and I want…
Krabi
  • 113
  • 1
  • 9
7
votes
1 answer

Micronaut - Resolve place holders in properties file

How to resolve placeholders in properties file similar to the below one. I am using an external properties file - dev.properties with entries similar to below: db.database: testdb db.user: testuser db.password: password db.dev_server:…
kTest
  • 367
  • 1
  • 11
7
votes
2 answers

Micronaut controller error Page Not Found

I created a new micronaut app using mn create-app example.micronaut.complete After that I opened the project using intellij and added a new class as TestController to the project with code below: package example.micronaut; import…
Khwaja Sanjari
  • 455
  • 5
  • 17
7
votes
4 answers

Is there an equivalent for Springs Resource in Micronaut?

I am migrating a tiny Spring Boot application to Micronaut 1.0.1 and I was wondering if there is an equivalent for org.springframework.core.io.Resource and their implementation such as ClasspathResource? In Spring Boot I inject a resource into a…
saw303
  • 8,051
  • 7
  • 50
  • 90