spring註解@Component、@Service等自動生成bean的命名規則

參考鏈接:信息來源 今天碰到一個問題,寫了一個@Service的bean,類名大致爲:CUser xml配置: <context:component-scan base-package="com.xxx.xx.x"/> 結果啓動報錯:No bean named 'cUser' is defined,即找不到名爲cUser的bean bean的名字不是我預期的"cUser",臨時將bean的名字硬性
相關文章
相關標籤/搜索