我有奇怪的情況:Eclipse中看到庫,但不能將其導入
我寫的類:
...
import org.springframework.test.context.web.WebAppConfiguration;
//import org.springframework.test.web.servlet.MockMvc;
@WebAppConfiguration
@ContextConfiguration(locations = { "classpath:/test/BeanConfig.xml" })
public class CandidateControllerTest {
...
如果我按Ctrl +鼠標左鍵和移動光標WebAppConfiguration我看到:
但在我主編我看到:
如果我移動光標anotation我看到消息:
WebAppConfiguration不能被解析爲一個類型
TI如何解決這個問題呢?
RESOLVE
我的應用程序有2個模塊。核心模塊中寫入彈簧測試(測試範圍)的依賴關係。當我在第二個模塊中編寫依賴項時 - 它已經開始工作。
我的猜測是,春季測試中衝突的類路徑條目。 –