Using @Value Spring Annotation with Groovy Using @Value Spring Annotation with Groovy spring spring

Using @Value Spring Annotation with Groovy


Use single quotes, ie.

public @Value('${valueA}') String valueA


since using a $ causes Groovy to interpret the annotation argument as a GString, you get a compile error. you can either escape \$ or use single quotes.