
Spring Boot
全栈独立开发者阿昌
这个作者很懒,什么都没留下…
展开
-
Spring Boot端口被占用问题
在已经运行了一个spring boot之后 再点击原创 2018-07-01 11:29:53 · 3923 阅读 · 0 评论 -
centos7启动sonar之后报错
2019.01.29 11:18:58 WARN es[][o.e.c.a.s.ShardStateAction] [rules][0] received shard failed for shard id [[rules][0]], allocation id [mzxUa1F2TouocnegSCRCwA], primary term [0], message [failed recove...原创 2019-01-29 11:24:03 · 1194 阅读 · 0 评论 -
对接入log4j2报错
在对接入log4j2过程中发现报错"D:\Program Files\Java\jdk1.8.0_66\bin\java.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote...原创 2019-01-15 11:27:33 · 4533 阅读 · 0 评论 -
使用maven私库的时候遇到的问题
1: Could not transfer artifact com.yolo:common:jar:1.0.0 from/to maven-releases (http://192.168.3.47:20010/repository/maven-releases/): Failed to transfer file: http://192.168.3.47:20010/repository...原创 2019-01-11 17:00:46 · 2750 阅读 · 0 评论 -
用ngnix做反向代理的项目swagger访问不了
1:swagger可以访问,但是点击具体的方法访问不了查询原因是因为域名后面的项目名不见了例如:正确的跳转链接是:https://xxxx/xiaohong/xxx但是实际上的链接变为了https://xxxx/xxx少了xiaohong这个项目名路径解决方法是在yml中设置#解决用域名访问不了swagger的解决方案springfox: documenta...原创 2019-01-11 10:38:27 · 5797 阅读 · 0 评论 -
spring boot对bean中的date对象输出成json之后的format问题
在get方法中加入@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")既可以解决时间格式问题原创 2018-11-22 09:58:19 · 597 阅读 · 0 评论 -
默认日志logback配置解析
前言今天来介绍下Spring Boot如何配置日志logback,我刚学习的时候,是带着下面几个问题来查资料的,你呢如何引入日志? 日志输出格式以及输出方式如何配置? 代码中如何使用?正文Spring Boot在所有内部日志中使用Commons Logging,但是默认配置也提供了对常用日志的支持,如:Java Util Logging,Log4J, Log4J2和Logback...转载 2018-10-10 11:26:42 · 2271 阅读 · 0 评论 -
nano wallet ios源码解读
1:创建种子// MARK: - Create Seed- (NSData *)createSeed;{ void *mem = malloc(32); NSData *data = [[NSData alloc] initWithBytes:mem length:32]; unsigned char *bytePair = (unsigned char ...原创 2018-10-09 21:16:39 · 216 阅读 · 0 评论 -
spring boot中集成jedis操作redis
1:添加maven依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-redis</artifactId> <version>1.4.7.RELEASE</ver...原创 2018-10-09 21:13:14 · 2391 阅读 · 1 评论 -
spring boot接入log4j2日志
1:<dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-api</artifactId> <version>2.6.2</version>原创 2018-10-15 10:54:43 · 707 阅读 · 0 评论 -
spring boot在构造器上调用yaml中的值为null
这是因为在构造器里面该对象还没有实例化,所以这个注入的对象是为null,执行顺序是先执行构造器,然后注入值 解决方法:这个类implement InitializingBean实现其方法public void afterPropertiesSet() throws Exception {}将构造器里面要做的操作放到这个方法里面即可 ...原创 2018-09-05 22:03:28 · 1846 阅读 · 0 评论 -
Spring Boot自定义静态资源映射
静态资源映射可以映射到classpath上也可以映射到磁盘系统上自定义静态资源映射需要自定义一个继承WebMvcConfigurationSupport类,并实现这个类下面的addResourceHandlers方法。1:映射到classpath上代码如下@Configurationpublic class GHCWebMvcConfig extends WebMvcConfigurationSu...原创 2018-07-01 11:41:03 · 1676 阅读 · 0 评论 -
jenkins+sonar报错
1:构建后报错ERROR: Error during SonarQube Scanner executionERROR: Task 'sonar-scanner' does not exist. Please use 'list' task to see all available tasks.ERROR: ERROR: Re-run SonarQube Scanner using t...原创 2019-01-29 14:33:53 · 4576 阅读 · 4 评论