It was really hard for me to find any information concerning annotations on default constractor. Finally I discovered that scala accepts the following syntax: class MyClass @Annotation() (val arg : Int) { }
It is important that an annotation is followed by (), otherwise parameters of MyClass are parsed as parameters of annotation...
Thanks alot! I've been looking for solution to use Scala with Spring. Constructor injection with @Autowired was the main part of the problem. For those who may be interested, now you can do: { @Component case class Foo @Component case class Bar @Autowired() (foo:Foo) }
deam, man, could you speaks russian, couse I don't understude anithing.
ReplyDeleteДа и английский мой просто пи#дец. 8)
this was a test message
Thanks alot!
ReplyDeleteI've been looking for solution to use Scala with Spring. Constructor injection with @Autowired was the main part of the problem.
For those who may be interested, now you can do:
{
@Component case class Foo
@Component case class Bar @Autowired() (foo:Foo)
}