關于springboot點餐系統的項目,為什么項目可以運行成功,但是測試Mapper這邊卻會報錯。
是不是因為websocket的jar包沖突的問題,可是運行可以通過的
我把webscoket的配置類注釋掉,也是能夠測試通過的
//就是測試這段代碼,測試不通過 public?interface?ProductCategoryMapper?{ ????@Insert("insert?into?product_category(category_name,category_type)?values(#{category_name,?jdbcType=VARCHAR},#{category_type,?jdbcType=INTEGER})") ????int?insertByMap(Map<String,?Object>?map); } //?注釋掉這段就可以了 @Component public?class?WebSocketConfig?{ ????//?@Bean ????//?public?ServerEndpointExporter?serverEndpointExporter()?{ ????//?????return?new?ServerEndpointExporter(); ????//?} }