0
我在項目中有3個模塊。其中之一叫common
。在這個模塊中,我試圖啓動Spring容器。其中一個豆生活在另一個模塊(webapp
),我也有一個模塊testapp
。所以,現在,在服務器上部署項目(Web應用程序和常見)後,是一切OK,但如果我試圖部署常見和testapp失敗,出現異常:如果bean不存在則不會失敗spring容器
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class[...]
我whant知道,如果它是任何可能忽略未知的bean和運行容器?我使用xml配置,沒有註釋。由於業務邏輯,它應該是xml
哇!男人,這真是很酷的解決方案!謝謝! – Dante
有關此解決方案的更多信息,請按照[鏈接](http://www.captaindebug.com/2012/08/using-spring-profiles-in-xml-config.html#.VwyzZzTBn1w) – Dante