max.
01/23/2017, 5:47 PM@Autowired
in my tests. So I have a class annotated with @Repository
and test that looks like the following
@RunWith(SpringJUnit4ClassRunner::class)
@ContextConfiguration
@ActiveProfiles("test")
class MyTest {
@Autowired lateinit var repo: MyRepository
}
With all this I get the error Could not autowire. No beans of 'MyRepository' type found
. Any ideas how to fix it without xml config files?🙂