訪問url的時候報500轉換錯誤
我查詢出了數(shù)據(jù),但是Controll返回值為什么不能是List,其他的String,Date,Int都可以,下面是錯誤的提示:
No converter found for return value of type: class java.util.ArrayList
我查詢出了數(shù)據(jù),但是Controll返回值為什么不能是List,其他的String,Date,Int都可以,下面是錯誤的提示:
No converter found for return value of type: class java.util.ArrayList
2017-11-05
舉報
2017-11-06
List轉json的時候要配置轉換器;增加的配置類繼承WebMvcConfigurerAdapter 再重寫configureMessageConverters方法 下面是我寫得;你試試看!
2022-03-26
不知道具體搜什么,能否提供一個wiki,對相關內容進行一個簡要說明錯誤:<textareaclass=form-controlrows=3resize=none></textarea>
2017-11-05
代碼奉上
Controll:
Repository:
User實體類:
application.yml:
Service:
求大佬解答?。。?!
2017-11-05
這個是錯誤的提示:
其他地方和作者基本都一樣的
2017-11-05
Controll類:
Repository接口:
Service類:
導入的包沒問題的
2017-11-05
包引入錯了包,你在導入ArrayList包時,導入的不是 java.util?下的包吧