Skip to content
Advertisement

Tag: micronaut

Methods signature got changed while compiling the gradle java application and referencing to other project

I have two projects known as (Common and ApiGateway).The common is a Gradle java project and ApiGateway is a Micronaut java application. In the common project, I am keeping all the common things and referencing the jar to the Apigateway project. Common project The below code is compiled with ./gradlew build The API gateway implements the IProductOperation interface which is

Micronaut – Create a bean without creating ApplicationContext

I have a Micronaut declarative HTTP client written using @client annotation. I want to call this while starting micronaut app before creating the ApplicationContext itslef. HttpClient : SampleHttpClient.java Application.java (Main class) Answer I want to call this while starting micronaut app before creating the ApplicationContext itslef. Micronaut doesn’t provide a mechanism to support that. You could write your own thing

Failed to load a service: io.micronaut.context.exceptions.BeanContextException: | Micronaut

I have just created a file named TransactionsRepository.java. I am not calling this class anywhere as of now TransactionsRepository.java Whenever I run ./gradlew run, it runs perfectly, but the moment I uncomment this line, it throws an error ERROR Exception in thread “main” java.lang.RuntimeException: Failed to load a service: io.micronaut.context.exceptions.BeanContextException: Unexpected error loading be an definition [com.example.$Transactions.TransactionsRepository$Intercepted$Definition]: failed to access

How to print out environment variables, when starting a Micronaut application

I am working on a Micronaut project, where I would like to see if the environment variables from the application.yml are being correctly assigned using the @Value annotation, when the app starts locally. But every time the app is starting it shows me that the variables are not being assigned to the environment variables from the application.yml file. That is

Extend Micronaut CustomJWTClaimsSetGenerator to provide all attributes

I have the following two classes which provide the JWT authentication mechanisem. CustomDelegatingAuthenticationProvider CustomJWTClaimsSetGenerator The default response to the client looks like this: My question. How can I extend the class to return all user attributes? Besides username I want to have the user id. UPDATE HDS user class which gathers the DB id Answer To extend the returned data

How can I work with micronaut 3 and google secret manager?

Currently migrating my application to Micronaut 3, I encountered one problem with micronaut-gcp. Especially with the google secret manager. I am using gradle with Kotlin DSL. Actual configuration: (not working, using plugin io.micronaut.library version 2.0.4) gradle 7.2 micronaut 3.0.1 Previous configuration: (working with no plugin, using micronaut-bom) gradle 6.5.1 micronaut 2.4.0 micronautGcp 3.5.0 I/ The Problem My goal is to

No such property: count for class: com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer

Creating a new application with the latest version of Micronaut using Intellj throws an exception during the build process. gradle-wrapper.properties build.gradle Answer You need to upgrade to Shadow 7.0.0. build.gradle: This issue has been fixed with PR #655. The root cause is a change to Groovy itself (Jira: GROOVY-9292, GitHub: PR #1050), details in the linked PR.

Advertisement