Ideal的使用技巧

一、springcloud项目如何将多个服务放到services中一起启动

1、打开ideal,再view -> Tool Windows -> services

2、在services界面 找到 run configuration type -> springboot即可

二、配置临时的启动参数

1、在edit configurations中

2、选择相应的服务,再VM options中配置

三、调整idea的虚拟内存

1、在 Help -> change memory settings 调整即可

四、设置提示词忽略大小写

1、File -> settings ->  Editor -> General -> code Completion  去掉 Math case

五、设置注释的快捷参数

1、类注释

打开 IDEA 的 Settings -> Editor->File and Code Templates -> Files,点击右边 Files 选项卡下面的 Class,在其中添加图中红框内的内容

或者

打开 IDEA 的 Settings -> Editor->File and Code Templates -> includes,在File Header中输入图中内容

2、方法注释

打开 IDEA 的 Settings -> Editor->Live Templates,新建 Template Group,在新建的temlate下创建Live Template具体内容如图

param和return内容:

groovyScript("def result = '';def params = \"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList(); for(i = 0; i < params.size(); i++) {if(params[i] != '')result+=' * @param '+ params[i] + ((i < params.size()- 1) ? '\\r\\n' : '')}; return result == '' ? null : '\\r\\n' + result ", methodParameters())
groovyScript("return \"${_1}\" == 'void' ? null : '\\r\\n * @return ' + \"${_1}\"", methodReturnType())

六、可设置多行tab

打开 IDEA 的 Settings -> Editor-> General -> Editor Tabs,去掉 Show tabs in one space即可

七、快速找到 {}的定位

ctrl+[ ctrl+] 可以快速跳转到方法大括号的起止位置,配合方法分隔符使用,不怕找不到方法在哪儿分割了

八、查询的小技巧

ctrl+shift+alt+n 或者 ctrl+shift+r

ctrl+shift+enter代码补齐

ctrl+alt+h 查看哪些地方调用

ctrl+alt+o 去除无用的包

free mybatis Tool 让mapper和xml相互跳转

相关推荐

  1. windows、Mac、IntelliJ IDEA常见配置和使用技巧

    2024-04-02 16:34:03       38 阅读
  2. IDEA使用

    2024-04-02 16:34:03       69 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-02 16:34:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-02 16:34:03       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-02 16:34:03       82 阅读
  4. Python语言-面向对象

    2024-04-02 16:34:03       91 阅读

热门阅读

  1. solibity常用语法

    2024-04-02 16:34:03       36 阅读
  2. C语言程序10题

    2024-04-02 16:34:03       25 阅读
  3. socket.io 跨域 cors.origin 的值,用于解决跨域问题

    2024-04-02 16:34:03       31 阅读
  4. 懒汉模式和饿汉模式有什么区别?

    2024-04-02 16:34:03       31 阅读
  5. Qt+OpenGL入门教程(四)——VBO、VAO和EBO

    2024-04-02 16:34:03       34 阅读
  6. electron-vite初遇

    2024-04-02 16:34:03       40 阅读
  7. ps教程谁教的好

    2024-04-02 16:34:03       38 阅读
  8. 【C++】STL中sort算法使用了什么排序算法?

    2024-04-02 16:34:03       37 阅读