[
https://issues.apache.org/jira/browse/ISIS-2754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Keir Haywood updated ISIS-2754:
--------------------------------------
Description:
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
was:
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.
> 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)