NimChimpsky
NimChimpsky

Reputation: 47280

intellij not picking up inherited class annotation using spring

I have BaseUnitTest, it looks like this

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"/applicationContext-test.xml"})
@Transactional
public abstract class BaseInitUser {

My actual test classes extend this and everything works fine. Except intellij is highlighting an error on bean injection, even though it actually works : enter image description here

But when I add the annoation specifying context config to subclass the error disapears :

@ContextConfiguration(locations = {"/applicationContext-test.xml"})
public class RegistrationControllerTest extends BaseInitUser {

Upvotes: 1

Views: 358

Answers (1)

CrazyCoder
CrazyCoder

Reputation: 401887

Looks like a known bug. Star/vote in YouTrack to receive notifications on progress.

Upvotes: 1

Related Questions