[
https://issues.apache.org/jira/browse/ISIS-2754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17378937#comment-17378937
]
ASF subversion and git services commented on ISIS-2754:
-------------------------------------------------------
Commit 6264d4775824948d24da9e95986476fdce913760 in isis's branch
refs/heads/ISIS-2754 from danhaywood
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=6264d47 ]
ISIS-2754: alias of alias fails for @DomainService, trying something simpler
> 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}
> that means we need to add @Named to @DomainService
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)