I\'m quite a newbie to Spring boot, but here\'s the problem I\'m facing now:
// Application.java
public class Application {
public static void main(String[] ar
The test environment needs to know where your beans are defined, so you have to tell it the location.
In your test class, add the @ContextConfiguration
annotation:
@RunWith(SpringRunner.class)
@AutoConfigureTestDatabase(replace = Replace.NONE)
@DataJpaTest
@ContextConfiguration(classes = {YourBeans.class, MoreOfYourBeans.class})
public class UserRepoTest {
@Autowired
private UserRepo userRepo = null;
@Autowired
private TestEntityManager entityManager = null;