Answer the question
In order to leave comments, you need to log in
How do you write an analogue of your Spring annotation in Groovy?
There is a Java code:
import org.springframework.stereotype.Component;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Component
public @interface TypeConverter {
}
Answer the question
In order to leave comments, you need to log in
In short, everything is complicated.
Chapter 1
We look at the Component sorts:
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Component {
/**
* The value may indicate a suggestion for a logical component name,
* to be turned into a Spring bean in case of an autodetected component.
* @return the suggested component name, if any
*/
String value() default "";
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question