振伟普拉斯的博客

写写代码,做做架构


  • 首页

  • 归档

  • 标签

  • 摄影

  • 站点地图

  • 关于

  • 搜索

You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support.

发表于 2020-05-07

在使用SpringBoot+jdbcTemplate连接MySQL数据库时出现如下报错:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:85)
at com.mysql.cj.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:132)
at com.mysql.cj.protocol.a.NativeProtocol.configureTimezone(NativeProtocol.java:2118)
at com.mysql.cj.protocol.a.NativeProtocol.initServerSession(NativeProtocol.java:2142)
at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:1310)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:967)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826)
... 48 more
阅读全文 »

WARNING Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.

发表于 2020-05-06

在使用SpringBoot搭建项目时,出现报错:

WARNING : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.

然后项目启动失败。

阅读全文 »

技术专家和架构师的区别

发表于 2020-05-04

当你崇尚技术,以技术为中心,把技术的地位放在业务之上时,那你可能会深入钻研某种技术,围绕着这种技术构建起你的知识体系,并且不断地拓宽知识半径,深化知识层次,最终成为这个技术领域的专家。

当你以业务为核心,认同技术是解决业务问题的手段,你围绕着要解决的问颗来组织、选择技术,最终形成了围绕特定业务问题的知识体系,善于识别、拆分业务问题,组织开发者采用合适的技术去落地解决业务问题,那你就成了架构归。

阅读全文 »

接口获取必应 Bing 每日高清壁纸

发表于 2020-05-03

必应Bing搜索首页每天会更新一张好看的壁纸,这点挺不错的。相比于百度的白底,这些由专业摄影师拍摄的全球风光照片显然有助于放松心情。那么问题来了,假如我想将每天不同的照片设置为博客背景的话,我们怎么获取这些图片呢?

其实Bing是提供了接口获取图片路径的,接口地址:https://cn.bing.com/HPImageArchive.aspx?n=1。

阅读全文 »

使用 Guava 的 ImmutableMap 构建不可变的 Map

发表于 2020-04-25

在实际开发中,我们往往需要定义和初始化一些常量Map,普通的做法一般是在static代码块中初始化:

1
2
3
4
5
6
public static Map<String, Integer> STATIC_MAP = new HashMap<>();

static {
STATIC_MAP.put("A", 1);
STATIC_MAP.put("B", 2);
}

这种方式只是创建一个初始化好的map,但这个map是有可能被别人修改的,达不到不可变的要求。

阅读全文 »

Eclipse 国内镜像下载站

发表于 2020-04-22

Eclipse官方下载地址在:https://www.eclipse.org/downloads/packages/,但有时因为网络问题访问不了,这时我们可以选用下面几个国内的下载镜像:

阅读全文 »
1…345…35
振伟普拉斯

振伟普拉斯

209 日志
78 标签
RSS
Creative Commons
友情链接
  • 美团技术团队
  • 阿里中间件团队博客
  • 阮一峰的网络日志
粤ICP备18019803号 © 2017 – 2021 振伟普拉斯
|