1. 程式人生 > 其它 >IDEA各項操作

IDEA各項操作

建立yml 不是啟動的

點yml->右鍵 ->Reload from dik

出現parent標籤報錯/外掛build報錯

加版本號 / file->invalidate caches->clear downloaded shared indexes ->invalidate and restart

解決埠號被佔用問題

cmd->netstat -ano|findstr "8080"->taskkill /f /t /pid 8600

萬能取消指令

ctrl+c

通過滑鼠滾輪實現字型大小

file->settings->Editor->General->Mouse control ->Changes font size whith ctrl+Mouse wheel

去除大小寫匹配

file->settings->Editor->General->codecompletion->Match Case(勾去掉)

設定引數自動提示

file->settings->Editor->General->codecompletion->parameter info ​ ->show parameter--+show the parameter--+show full method

設定字符集,要求使用UTF-8編碼 中文亂碼問題

file->settings->Editor->file encodings ​ ->global encoding--+project encoding--+default encoding for properties files

配置專案編碼方式

file->settings-> Editor->file Encodings->Project Encoding/Default encoding for改為UTF8

實現IDEA自動編譯

file->settings->build->compiler ->build project automatically--+compile independent modules in parallel

Maven測試專案刪除

點Maven專案->右鍵->remove module->remove

建立專案pom.xml不能識別問題

點pom.xml->右鍵->+add as Maven project

pom有橫線

file->settings->build->buildtools->Maven->lgnored Files->打勾的全部取消

外掛安裝(熱部署)

file->settings->plugins->lombok->installed->apply->ok

IDEA安裝外掛(maven helper)

file->settings->plugins->maven helper->installed->apply->ok

@Autowired中屬性封裝報錯

file->settings->editor->inspections->spring core->core ->Autowiring for been/autowiring inspring been component->apply->ok

檢測錯誤

file->settings->editor->inspections->spring core->core->Autowiring for been class ->severity->no highlighting.only fix->apply->ok

自動導包快捷鍵

File->settings->editor->general->auto import->add unambiguous imports on the fly和optimize imports on the fly都打勾->apply->ok

配置JDK編譯環境

file->settings->build->compiler->全部打勾

maven環境配置本地儲存

file->settings->build->buildtools->Maven->maven home path:...apache-maven-3.6.3 ​ user settings file:..conf/settings--+local repository:本地磁碟,在 conf/settings中查詢

完成IDEA環境配置,測試專案建立

File->new->project->springlnitializr->project SDK1.8->next ->group/artifact/java version8版本->next->web->springweb->next

修改檔案版本號

file->settings->build->compiler->Java compiler->Project bytecode version改為8

XML檔案中parent標籤報錯/外掛報錯說明

File ->invalidate Caches/Restart ->Clear downloaded shared indexes 打勾 ->invalidate and shared indexes 和將上文的版本號複製 貼上到build標籤中

IDEA連線資料庫

右邊database -> 左上角 + ->DataSource ->Mysql ->User使用者名稱->password 密碼

->URL:jdbc:mysql://localhost:3306/nacos_config?serverTimezone=Asia/Shanghai&characterEncoding=utf8

->Test Connection測試一下->Apply ->ok

執行資料庫-->在右側空白處右鍵-->run SQL script

顯示資料庫-->在右側空白處右鍵-->database Tools-->manage shown schemas

IDEA工具的隱藏 顯現

view ->Tool windows

反序列化時的UID與序列化時的UID要保持一致,或者測試時一次序列操作對應一次反序列化操作,否則不匹配就報錯

File->settings->editor->inspections->搜尋UID->serializable class without serialVersionUID後面打對勾->severity:waring inAll Scopes ->Apply->ok

在pojo上選中類名 alt+回車