Skip to content

Add support for Jakarta CDI - #2970

Merged
filiphr merged 2 commits into
mapstruct:mainfrom
filiphr:2950-jakarta-cdi
Aug 24, 2022
Merged

filiphr merged 2 commits into
mapstruct:mainfrom
filiphr:2950-jakarta-cdi

Conversation

@filiphr

@filiphr filiphr commented Aug 21, 2022

Copy link
Copy Markdown
Member

Fixes #2950

return true;
}

private Type getType(String simpleName) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getCDIType

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to complicate things. This also fetches the @Inject from the inject package as well

@filiphr
filiphr merged commit 874bf1f into mapstruct:main Aug 24, 2022
@filiphr
filiphr deleted the 2950-jakarta-cdi branch August 24, 2022 16:38
@Felk

Felk commented Feb 13, 2023

Copy link
Copy Markdown

Hello, I am curious if this is landing in a release any time soon? I am playing around with Quarkus 3.0.0 Alpha4, which includes the transition from the javax to jakarta namespace. Being able to just switch the component model from CDI to JAKARTA_CDI would mean mapstruct is well-prepared with a clear migration path once Quarkus 3.0 hits stable 😁

@edeandrea

Copy link
Copy Markdown

I too am looking for this feature because of Quarkus 3 & the move to the jakarta namespace. RIght now I really have no workaround as @Singleton does not work (because I mock/spy using Mockito) and you can't mock/spy on @Singleton beans. It needs to be @ApplicationScoped.

@edeandrea

Copy link
Copy Markdown

@filiphr / @sjaakd Please see previous comments.

@filiphr

filiphr commented Apr 15, 2023

Copy link
Copy Markdown
Member Author

This has now been backported to 1.5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Jakarta @ApplicationScoped is missing

4 participants