You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Daniel Keir Haywood (Jira)" <ji...@apache.org> on 2021/07/09 05:52:00 UTC

[jira] [Updated] (ISIS-2754) Use @AliasFor to declare Spring's @Named from @DomainService(logicalTypeName)

     [ https://issues.apache.org/jira/browse/ISIS-2754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Keir Haywood updated ISIS-2754:
--------------------------------------
    Summary: Use @AliasFor to declare Spring's @Named from @DomainService(logicalTypeName)  (was: [NOT POSSIBLE] Use @AliasFor to declare Spring's @Named from @DomainService(logicalTypeName))

> Use @AliasFor to declare Spring's @Named from @DomainService(logicalTypeName)
> -----------------------------------------------------------------------------
>
>                 Key: ISIS-2754
>                 URL: https://issues.apache.org/jira/browse/ISIS-2754
>             Project: Isis
>          Issue Type: New Feature
>          Components: Isis Core
>    Affects Versions: 2.0.0-M5
>            Reporter: Daniel Keir Haywood
>            Assignee: Daniel Keir Haywood
>            Priority: Minor
>             Fix For: 2.0.0-M6
>
>
> attempted this, using:
> {code:java}
> public @interface DomainService {
>     // ...
>     @AliasFor(annotation = Named.class, attribute = "value")
>     String logicalTypeName() default "";
> } {code}
> however it results in:
> {code:java}
> Caused by: org.springframework.core.annotation.AnnotationConfigurationException: @AliasFor declaration on attribute 'logicalTypeName' in annotation [org.apache.isis.applib.annotation.DomainService] declares an alias for attribute 'value' in annotation [javax.inject.Named] which is not meta-present. 
> at org.springframework.core.annotation.AnnotationTypeMapping.validateAllAliasesClaimed(AnnotationTypeMapping.java:372) 
> at org.springframework.core.annotation.AnnotationTypeMapping.afterAllMappingsSet(AnnotationTypeMapping.java:359) 
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) 
> at org.springframework.core.annotation.AnnotationTypeMappings.<init>(AnnotationTypeMappings.java:69) 
> at org.springframework.core.annotation.AnnotationTypeMappings.<init>(AnnotationTypeMappings.java:46) 
> at org.springframework.core.annotation.AnnotationTypeMappings$Cache.createMappings(AnnotationTypeMappings.java:245) 
> at java.base/java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:330) {code}
> which I think means that @Named is not itself annotated to be a meta-annotation; presumably required by Spring's annotation processor.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)