I have a simple question: how could I use spring @Autowired in the constructor of this Scala class?
class MessageMBeanExporter(messageDirectory: MessageDirectory) extends MBeanExporter with SmartLifecycle { ..... }
I have not tried, but according to this and this link , from 2.8+ you can do:
class MessageMBeanExporter @Autowired() (messageDirectory: MessageDirectory) extends MBeanExporter with SmartLifecycle { ..... }
I added @Autowired support in the Scala object constructor to the spring - scala project. It is only (at the time of writing) in the night shot.
It allows you to do
@Component @Autowired class Service(dep : Dependency) { }
https://github.com/spring-projects/spring-scala
Source: https://habr.com/ru/post/950722/More articles:Converting UTC to local time returns a strange result - c #WPF TextBlock Overlaps Ellipse - c #Google App Engine with Android - endpoint testing on a real device - androidHow to analyze content located in certain HTML tags using nutch plugin? - nutchAngularjs: more than a filter with ng-repeat - javascriptRDBMS vs NoSQL for CRM, CMS and other financial systems - mysqlMain dump section - coredumpManually dump an elf core - coredumpGet the last Sunday of the month - ruby | fooobar.comUrlMapping for static files in Grails - grailsAll Articles