Non-static method 'save(java.long.Object)' cannot be referenced from a static context.
犯了一個很低階的錯誤,
Non-static method ‘save(java.long.Object)’ cannot be referenced from a static context.
非靜態方法“儲存(java.長物件)”不能從靜態上下文引用。
如圖:
解決方法:
檢查mongoTemplate是否注入:
請注入正確:
相關文章
- Non-static method Redis::hSet () cannot be called staticallyRedis
- The type XXX cannot be resolved.It is indirectly referenced from required .classUI
- It is indirectly referenced from required .class fileUI
- "_OBJC_CLASS_$_XXX", referenced from:OBJ
- Laravel Lego :Save you from CRUDLaravelGo
- "_dns_free_resource_record", referenced from:問題DNS
- redis : Can't save in background: fork: Cannot allocate memoryRedis
- _OBJC_CLASS_$_某檔名", referenced from:的問題OBJ
- cannot import name ‘multiarray‘ from ‘numpy.core‘Import
- vue-cli 自定義路徑別名 assets和static資料夾的區別 --save-dev和--save的區別Vuedev
- Error: cannot fetch last explain plan from PLAN_TABLEErrorASTAI
- MyBatis提示getFundBonus attempted to return null from a method with a primitive return type (double)MyBatisNullMIT
- 解決 ImportError: cannot import name 'imread' from 'scipy.misc'ImportError
- ImportError: cannot import name 'get_ora_doc' from partially initialized moduleImportErrorZed
- The entity "nbsp" was referenced, but not declared
- 開發中遇到的bug-Property or method “xxxx“ is not defined on the instance but referenced during render.
- npm install -save 和 -save-devNPMdev
- npm –save-dev –save 的區別NPMdev
- canvas save()Canvas
- Program Units and Referenced Objects (244)Object
- Session State and Referenced Packages (246)SessionPackage
- ORA-22992 cannot use LOB locators selected from remote tablesREM
- 關於Cannot resolve scoped service from root provider解決方案IDE
- java.lang.NoSuchMethodError: No static method getFont(Landroid/content/Context;ILandroid/util/Typ...JavaErrorAndroidContext
- the method of fixing the problem of using SSIS and SharePointListAdapters to sync data from DB to ShAPT
- Fragment FirstFragment{a01a0ff} not attached to a context.FragmentContext
- JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime` from StringJSONErrorJavaLDA
- ERROR 1548 (HY000): Cannot load from mysql.proc. The table is probably corruptedErrorMySql
- JAVA int 強制型別轉換錯誤提示(Cannot cast from Object to int)Java型別ASTObject
- save() create()區別
- canvas save()和restore()CanvasREST
- Unable to save settings: Failed to save settings. Please restart PyCharm解決AIRESTPyCharm
- 開啟託管server報錯:Cannot read from policy store. Reason is PolicyStore ErrorServerError
- 50、abstract的method是否可同時是static,是否可同時是native,是否可同時是synchronized?synchronized
- Name [spring.liveBeansView.mbeanDomain] is not bound in this Context. Unable to findSpringBeanViewAIContext
- java static 與 static靜態程式碼塊Java
- Save and Edit a Report Specification locally
- Excel匯入資料異常Cannot get a text value from a numeric cell解決辦法Excel