如題,當使用intellij idea開發maven項目時,代碼有時報錯爲:Usage of API documented as @since 1.8+ ,此時需要指定模塊的Language Level.
步驟:
File --> Project Structure --> Project Settings --> Modules
選擇對應的module,設置source對應的Language level 爲報錯提示對應的版本,此處我的顯示需要api支持1.8+,所以,設置級別爲8 - Lambdas, type annotation etc.應用後即可解決問題。
再操作:Settings --> Build,Extension,Deployment --> Compile --> Java Compile 設置對應module的Target bytecode version爲對應的版本。