JavaShuo
欄目
標籤
springboot在實體類中創建一個有參的構造函數 報錯 Consider defining a bean of type 'java.lang.String' in your configurat
時間 2021-01-11
標籤
註解
欄目
Spring
简体版
原文
原文鏈接
新建了一個實體類 準備測試一下 @ModelAttribute註解的用法,在實體類裏面寫了一個有參的構造方法 編譯正常, 啓動項目報錯如下 看問題描述意思是: com.example.demo.Book中構造函數的參數0需要找不到「java.lang.String」類型的bean。 並建議在配置中定義一個「java.lang.String」類型的bean。 問題原因:spring boot 自動注
>>阅读原文<<
相關文章
1.
一個扎心的錯——Consider defining a bean of type 'java.lang.String' in your configuration.
2.
Consider defining a bean of type 'xxx' in your configuration.
3.
Consider defining a bean of type 'javax.activation.DataSource' in your configuration.
4.
spring boot 出現Consider defining a bean of type '*********' in your configurat
5.
springboot啓動報Consider defining a bean of type 'xxx' in your configuration的錯
6.
Consider defining a bean of type 'com.ls.config.DBConfig1' in your configuration
7.
springboot報錯:Consider defining a bean of type com.service.VodClient in your configuration
8.
Consider defining a bean of type xxxxMapper in your configuration
9.
Consider defining a bean of type 'com.lvjing.dao.DeviceStatusMapper' in your configuration.
10.
SpringBoot項目啓動報 Consider defining a bean of type xxxxx.' in your configuration.
更多相關文章...
•
Eclipse 創建 Java 類
-
Eclipse 教程
•
網絡體系的構成和類型
-
TCP/IP教程
•
TiDB 在摩拜單車在線數據業務的應用和實踐
•
C# 中 foreach 遍歷的用法
相關標籤/搜索
configurat
consider
defining
建立一個類
java.lang.string
參數種類、參數個數
創造
參錯
bean
建造
Spring
Java
Redis教程
PHP參考手冊
Spring教程
SpringBoot
架構
建議
0
分享到微博
分享到微信
分享到QQ
每日一句
每一个你不满意的现在,都有一个你没有努力的曾经。
最新文章
1.
如何將PPT某一頁幻燈片導出爲高清圖片
2.
Intellij IDEA中使用Debug調試
3.
build項目打包
4.
IDEA集成MAVEN項目極簡化打包部署
5.
eclipse如何導出java工程依賴的所有maven管理jar包(簡單明瞭)
6.
新建的Spring項目無法添加class,依賴下載失敗解決:Maven環境配置
7.
記在使用vue-cli中使用axios的心得
8.
分享提高自己作品UI設計形式感的幾個小技巧!
9.
造成 nginx 403 forbidden 的幾種原因
10.
AOP概述(什麼是AOP?)——Spring AOP(一)
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
1.
一個扎心的錯——Consider defining a bean of type 'java.lang.String' in your configuration.
2.
Consider defining a bean of type 'xxx' in your configuration.
3.
Consider defining a bean of type 'javax.activation.DataSource' in your configuration.
4.
spring boot 出現Consider defining a bean of type '*********' in your configurat
5.
springboot啓動報Consider defining a bean of type 'xxx' in your configuration的錯
6.
Consider defining a bean of type 'com.ls.config.DBConfig1' in your configuration
7.
springboot報錯:Consider defining a bean of type com.service.VodClient in your configuration
8.
Consider defining a bean of type xxxxMapper in your configuration
9.
Consider defining a bean of type 'com.lvjing.dao.DeviceStatusMapper' in your configuration.
10.
SpringBoot項目啓動報 Consider defining a bean of type xxxxx.' in your configuration.
>>更多相關文章<<