Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom inject annotation using implements TypedAnnotationMapper not working #10801

Open
gabriellersa opened this issue May 6, 2024 · 1 comment
Labels
type: question Further information is requested

Comments

@gabriellersa
Copy link

Expected Behavior

I am attempting to create a custom @service annotation that maps to the @bean and @DefaultScope annotations in Micronaut. The expected behavior is that when a class is annotated with @service, Micronaut should generate a corresponding HelloWorldService$Definition class during compilation. However, this is not happening.

Actual Behaviour

However, this is not happening. The HelloWorldService$Definition class is not being generated and as a result, the bean annotated with @Service is not being injected where it's needed. This is causing a failure in the dependency injection process.

Steps To Reproduce

1 - Download the main branch from https://github.com/gabriellersa/demo
2 - Run mvn clean install -U and observe the generated target

Environment Information

  • openjdk 17.0.9 2023-10-17 LTS
    OpenJDK Runtime Environment Corretto-17.0.9.8.1 (build 17.0.9+8-LTS)
    OpenJDK 64-Bit Server VM Corretto-17.0.9.8.1 (build 17.0.9+8-LTS, mixed mode, sharing)

Example Application

No response

Version

4.4.2

@graemerocher
Copy link
Contributor

the mapper and the annotation cannot be in the same project since the mapper has to be on the annotation processor classpath of the target project

@graemerocher graemerocher added the type: question Further information is requested label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants