IDEA2017知识点

参考博文:https://www.cnblogs.com/qlqwjy/p/8081676.html

①复制粘贴问题

看了一些网上的文章没解决自己的问题

https://blog.csdn.net/bjstyle/article/details/79486544

https://www.cnblogs.com/yingsong/p/7991233.html

第二天重启了,就好用了,下一次出现问题可以按Esc试一下。

②码云的配置:git+码云

注:很多博客都漏写一步,VCS中选择代码托管。

参考大神:https://blog.csdn.net/qq_41771222/article/details/82218281

重启IDEA

③降低@autowired的警告级别

④导入项目

File→open→选择路径→点击ok

jdk不一致的话需要修改一下,参考博文https://blog.csdn.net/annan14112/article/details/79798956

⑤翻译插件的安装

参考:https://blog.csdn.net/u014653854/article/details/80389289

⑥lombok插件的安装

插件的安装其实都相似,参考一下上边的博文

问题:Annotation processing seems to be disabled for the project "demo". For the plugin to function correctly, please enable it under

⑦创建maven项目,启动maven下的两个子项目进行相互调用的时候,有一部操作可以让操作更直观,看下图

启动其中一个刷新maven会发弹出一个窗口

点击该窗口

选择第一个

效果:两个子模块在一个窗口显示。方便管理

⑧去除自动更新pom.xml

⑨Maven clean 

如果clean成功之后,一般需要重新编译一下菜单栏 build → Recompile 项目

clean 失败。。

"C:\Program Files\Java\jdk1.8.0_191\bin\java" -Dmaven.multiModuleProjectDirectory=D:\temp\idea_workspace\eureka-demo\userservice -DarchetypeCatalog=internal -Dmaven.home=F:\develop_web\Maven\apache-maven-3.3.9 -Dclassworlds.conf=F:\develop_web\Maven\apache-maven-3.3.9\bin\m2.conf -javaagent:F:\develop_web\IDEA\IntelliJIDEA\lib\idea_rt.jar=5150:F:\develop_web\IDEA\IntelliJIDEA\bin -Dfile.encoding=UTF-8 -classpath F:\develop_web\Maven\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2017.1.2 -s F:\develop_web\Maven\apache-maven-3.3.9\conf\settings.xml clean
[INFO] Scanning for projects...
Downloading: http://localhost:8081/nexus/content/groups/public/org/springframework/cloud/spring-cloud-dependencies/Finchley.SR1%7D/spring-cloud-dependencies-Finchley.SR1%7D.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not transfer artifact org.springframework.cloud:spring-cloud-dependencies:pom:Finchley.SR1} from/to nexus (http://localhost:8081/nexus/content/groups/public/): Connect to localhost:8081 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect @ com.leyou.demo:eureka-demo:1.0-SNAPSHOT, D:\temp\idea_workspace\eureka-demo\pom.xml, line 32, column 25
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.leyou.demo:user-service:1.0-SNAPSHOT (D:\temp\idea_workspace\eureka-demo\userservice\pom.xml) has 1 error
[ERROR]     Non-resolvable import POM: Could not transfer artifact org.springframework.cloud:spring-cloud-dependencies:pom:Finchley.SR1} from/to nexus (http://localhost:8081/nexus/content/groups/public/): Connect to localhost:8081 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect @ com.leyou.demo:eureka-demo:1.0-SNAPSHOT, D:\temp\idea_workspace\eureka-demo\pom.xml, line 32, column 25 -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Process finished with exit code 1

这里的原因是手误,父工程的pom.xml中,版本的管理多了一个 } 导致的子模块的异常

修改过来后,问题解决了一般,还有两个jar包没进来。clean成功,因为没有语法错误。

解决方法:ctrl+x→ctrl+s→ctrl+v 重新导入一下就ok了。大概是没反应过来。。。

⑩spring-boot-maven-plugin作用

参考:https://blog.csdn.net/lwj_199011/article/details/54881277

11.启动Eureka服务启动报错

 原因:在默认设置下,eureka服务注册中心也会将自己作为客户端来尝试注册它自己,所以我们需要禁用它的客户端注册行为:

server:
  port: 10086
eureka:
  instance:
    hostname: localhost
  client:
    register-with-eureka: false
    fetch-registry: false

问题描述:根据文档进行配置

server:
  port: 10086 # 端口
spring:
  application:
    name: eureka-server # 应用名称,会在Eureka中显示
eureka:
  client:
    register-with-eureka: false # 是否注册自己的信息到EurekaServer,默认是true
    fetch-registry: false # 是否拉取其它服务的信息,默认是true
    service-url: # EurekaServer的地址,现在是自己的地址,如果是集群,需要加上其它Server的地址。
      defaultZone: http://127.0.0.1:${server.port}/eureka

# EurekaServer是客户端同时又是服务器,默认集群,加了defaultZone:本地,就是让它自己去调自己的服务,避免了没有集群报错,但是又带来两个新问题

  1. Rureka客户端上会出现一个unknow service
  2. 并且自己调用自己,自己还没有初始化完成,还是带有一段错误的日志信息

自然还是于是有了上面两步的配置,可以结合解决这个问题。

12、设置自动提示的快捷键,不知道怎么了Alt都无法设置,只好设置成了空格加  l.

13、IDEA中JSON编辑工具

将光标放到字符串中间

搜索 json

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值