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
- Property or method “option“ is not defined on the instance but referenced during render. Make sure t
- static inner class和非static inner class的例項化問題(can only instantiate non-static inner class...)
- redis : Can't save in background: fork: Cannot allocate memoryRedis
- MapStruct-plus cannot find converter fromStruct
- 開發中遇到的bug-Property or method “xxxx“ is not defined on the instance but referenced during render.
- QSocketNotifier: Socket notifiers cannot be enabled or disabled from another
- cannot import name ‘multiarray‘ from ‘numpy.core‘Import
- The number of method references in a .dex file cannot exceed 64K.
- ImportError: cannot import name ‘BaseQuery‘ from ‘flask_sqlalchemy‘ImportErrorFlaskSQL
- cannot reclaim 52428800 bytes disk space from 4070572032 limitAIMIT
- 解決 ImportError: cannot import name 'imread' from 'scipy.misc'ImportError
- java.lang.NoSuchMethodError: No static method getFont(Landroid/content/Context;ILandroid/util/Typ...JavaErrorAndroidContext
- 關於Cannot resolve scoped service from root provider解決方案IDE
- TypeError: Cannot read private member xxx from an object whose class did not declare itErrorObject
- Cannot load from short array because "sun.awt.FontConfiguration.head" is nullNull
- ImportError: cannot import name 'get_ora_doc' from partially initialized moduleImportErrorZed
- Static and Animated 3D Scene Generation from Free-form Text Descriptions3DORM
- [20200416]ORA-01187 cannot read from file because it failed verification tests.AI
- JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime` from StringJSONErrorJavaLDA
- npm install -save 和 -save-devNPMdev
- npm –save-dev –save 的區別NPMdev
- canvas save()Canvas
- Save Water
- [已解決] [HiveCatalog]Kerberos GSS initiate failed, No valid credentials provided, Cannot read from System.inHiveROSAIIDE
- Fragment FirstFragment{a01a0ff} not attached to a context.FragmentContext
- Java更新資料庫報錯:Data truncation: Cannot create a JSON value from a string with CHARACTER SETJava資料庫JSON
- save download pdf
- Excel匯入資料異常Cannot get a text value from a numeric cell解決辦法Excel
- Numerical Results of RhDYas CG method and RhLHas CG method
- 50、abstract的method是否可同時是static,是否可同時是native,是否可同時是synchronized?synchronized
- Unable to save settings: Failed to save settings. Please restart PyCharm解決AIRESTPyCharm
- Kernel Method
- Swizzling Method
- Greedy Method
- canvas save()和restore()CanvasREST
- docker tag save loadDocker
- save() create()區別