amanda.hinchman-dominguez
06/29/2018, 6:39 PMamanda.hinchman-dominguez
06/29/2018, 6:39 PMamanda.hinchman-dominguez
06/29/2018, 6:40 PM@Autowired
and giving that a shot. What puzzled me was that the Controller class I created was actually expecting a certain order in the parameter. I'll let you know what the following returns here:amanda.hinchman-dominguez
06/29/2018, 6:41 PM@Controller
class HtmlController(private val connectionRepository: ConnectionRepository,
private val twitter: Twitter) {
@Autowired
private val markdownConverter = MarkdownConverter()
robfletcher
06/29/2018, 6:41 PM@Configuration
class or something?robfletcher
06/29/2018, 6:41 PMpavel
06/29/2018, 6:42 PM@Autowired
private val markdownConverter = MarkdownConverter()
shouldn’t workpavel
06/29/2018, 6:42 PMrobfletcher
06/29/2018, 6:42 PMamanda.hinchman-dominguez
06/29/2018, 6:42 PMpavel
06/29/2018, 6:42 PMval
means it will notamanda.hinchman-dominguez
06/29/2018, 6:43 PMpavel
06/29/2018, 6:43 PMlateinit var
robfletcher
06/29/2018, 6:43 PM@Configuration
class call the constructor? If so that probably needs to change to accomodate your additional params.amanda.hinchman-dominguez
06/29/2018, 6:43 PMamanda.hinchman-dominguez
06/29/2018, 6:44 PMrobfletcher
06/29/2018, 6:44 PM@Autowired
DOES NOT apply to constructors you call explicitly from @Configuration
only to components Spring “discovers”robfletcher
06/29/2018, 6:45 PMamanda.hinchman-dominguez
06/29/2018, 6:45 PMlateinit
and configurations gave me concerns about how the code will actually pass through the classesrobfletcher
06/29/2018, 6:45 PM@Controller
annotation)pavel
06/29/2018, 6:45 PM@Autowired
Spring will call the setter right after creating the objectrobfletcher
06/29/2018, 6:46 PMval
and not have to screw around with lateinit
or mutable propertiespavel
06/29/2018, 6:47 PMlateinit var
amanda.hinchman-dominguez
06/29/2018, 6:47 PMpavel
06/29/2018, 6:47 PMamanda.hinchman-dominguez
06/29/2018, 6:48 PMamanda.hinchman-dominguez
06/29/2018, 6:48 PMsp
06/30/2018, 12:34 AMsp
06/30/2018, 12:34 AMsp
06/30/2018, 12:35 AM