系统应用网关项目记录

设及技术:springboot、httpClient、apollo、rocketMQ、swagger、eurake

1、从svn下载项目,项目是以模块形式,直接打开文件夹,发现项目层级划分已经存在。

单独一个项目的打开是打卡pom文件,这里多个模块一起打开,不是文件格式是因为.iml     intellij idea的工程配置文件存在,直接打开一个项目的文件夹,需要在project structure-----modules下手动配置项目层级目录

2、idea里面的项目一直在加在plugins,但是我之前已经创建过springboot项目,所以这时候要检查maven是不是不是自己的。

file---------settings-----build,Execution,deployment-------build Tools------Maven  检查Maven home directory和user settings file和Local  repository是不是自己配置的。(我发现我的不是!!!!明明已经override了!)

3、pom文件下报了这样一个错

这时候选择找到pom.xml -------- 右击  --> Maven --> reImport(可以了)

4、启动项目出现一个警告

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. 

用的是mysql最新的驱动jar包,所以jdbc.driverClassName也要改变了

解决办法:
将com.mysql.jdbc.Driver  改为  com.mysql.cj.jdbc.Driver即可。

我用的jdk是1.8报告是异常,不修改也不影响,1.9的话会报出异常。

 5、我需要再原有模块中在复制其中一个模块作为一个新的模块

参考:

https://blog.csdn.net/qq2710393/article/details/83072457

解决!

7、将自定义jar导入本地库中:

<!--需下载源码打包install到自己的库里,地址https://github.com/apache/rocketmq-spring-->
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-spring-boot-starter</artifactId>
<version>2.0.1-SNAPSHOT</version>
</dependency>

https://blog.csdn.net/u013803262/article/details/52800073

 8、

 注意:

我好像将配置文件改为热启动了,修改pom文件后直接自动更新了

9、@Value的缺省值,看到有冒号 我一脸蒙圈

https://blog.csdn.net/earthhour/article/details/80334501?utm_source=blogxgwz3

10、springboot集成RMQ

https://github.com/apache/rocketmq-spring/blob/master/README_zh_CN.md

11、

java.lang.NoClassDefFoundError: 

https://blog.csdn.net/wushexin/article/details/79293319

根据办法 结果又出现这个问题:

debugger  throw new NoSuchFieldException(name);

后来我:

把这两项点掉就没问题了。可以直接debugger了。

12、"Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported"

https://blog.csdn.net/beguile/article/details/80460957

13、自定义一个异常类

14、将String转换为JsonObject

https://blog.csdn.net/superit401/article/details/51727739

15、字节数组转字符串

new String(字节数组)

16、动态设置注解值
@RocketMQMessageListener(topic = "${rocketmq.topic}", consumerGroup = "${rocketmq.conumerGroup}")
17、map转对象
LogEntity logEntity = JSON.parseObject(JSON.toJSONString(map), LogEntity.class);
18、

往MySql数据库存入精确时间时,为什么总是只存入年月日,没有时分秒?

https://blog.csdn.net/yjh_dream/article/details/79916007

19、异常抛出吗

http://www.cnblogs.com/wangyingli/p/5912269.html

了解一些:

容灾系统是指在相隔较远的异地,建立两套或多套功能相同的IT系统,互相之间可以进行健康状态监视和功能切换,当一处系统因意外(如火灾、地震等)停止工作时,整个应用系统可以切换到另一处,使得该系统功能可以继续正常工作。容灾技术是系统的高可用性技术的一个组成部分,容灾系统更加强调处理外界环境对系统的影响,特别是灾难性事件对整个IT节点的影响,提供节点级别的系统恢复功能。 

原文地址:https://www.cnblogs.com/psyche61/p/10244160.html