随笔分类 -  SpringBoot

摘要:Spring Boot允许您外部化配置,以便您可以使用同一个应用程序代码在不同的环境中。 您可以使用属性文件,YAML文件,环境变量和外部化配置的命令行参数。 属性值可以直接注入您的bean使用@Value注释,通过Spring的Environment抽象访问或绑定到通过@Configuration 阅读全文
posted @ 2020-01-14 09:27 盲目的拾荒者 阅读(420) 评论(0) 推荐(0)
摘要:不是每个人都喜欢继承spring-boot-starter-parent POM。 您可能拥有自己需要使用的公司标准父级,或者您可能更愿意明确声明所有Maven配置。 如果您不想使用spring-boot-starter-parent,您仍然可以通过使用scope = import依赖项来保持依赖项 阅读全文
posted @ 2020-01-14 09:00 盲目的拾荒者 阅读(582) 评论(0) 推荐(0)
摘要:GitHub 详细介绍地址 https://github.com/apache/incubator-dubbo-spring-boot-project/blob/master/README_CN.md https://github.com/apache/incubator-dubbo-spring- 阅读全文
posted @ 2020-01-13 15:51 盲目的拾荒者 阅读(777) 评论(0) 推荐(0)
摘要:GitHub地址,最新版本为2.0.2基于spring boot 2.x https://github.com/codecentric/spring-boot-admin 注意:选分支版本每个版本还一样:本示例是基于1.5.x 开始整合的时候踩了很多坑,都是因为版本不兼容的问题,最后在gitHub上 阅读全文
posted @ 2020-01-13 14:50 盲目的拾荒者 阅读(734) 评论(0) 推荐(0)
摘要:非注册中心版:https://blog.csdn.net/niugang0920/article/details/82528434 缺点就是每一个client都需要写admin-server的地。如果应用都注册在Eureka中就不需要再对每个应用进行配置,Spring Boot Admin会自动从注 阅读全文
posted @ 2020-01-13 14:48 盲目的拾荒者 阅读(2073) 评论(0) 推荐(1)
摘要:Spring Boot Admin 整合Hystrix UI Module,Turbine UI Module. 报如下错误: ​首先确保你的admin-server引入了一下的依赖: <!--引入hystrix --> <dependency> <groupId>de.codecentric</g 阅读全文
posted @ 2020-01-13 14:46 盲目的拾荒者 阅读(341) 评论(0) 推荐(0)
摘要:1.什么是Spring Boot Admin codecentric的Spring Boot Admin是一个社区项目,用于管理和监控SpringBoot®应用程序。 应用程序向我们的Spring Boot Admin Client注册(通过HTTP)或使用SpringCloud®(例如Eureka 阅读全文
posted @ 2020-01-13 14:43 盲目的拾荒者 阅读(379) 评论(0) 推荐(0)
摘要:https://github.com/alibaba/druid/tree/master/druid-spring-boot-starter Druid Spring Boot Starter Druid Spring Boot Starter 用于帮助你在Spring Boot项目中轻松集成Dru 阅读全文
posted @ 2020-01-13 14:42 盲目的拾荒者 阅读(3761) 评论(0) 推荐(0)
摘要:定时任务1 定时任务2 配置类 微信公众号 阅读全文
posted @ 2020-01-13 14:14 盲目的拾荒者 阅读(798) 评论(0) 推荐(0)
摘要:问题描述: springboot版本 2.1.1 pom.xml配置 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifa 阅读全文
posted @ 2020-01-13 11:55 盲目的拾荒者 阅读(1455) 评论(0) 推荐(0)
摘要:@Valid是使用hibernate validation的时候使用 @Validated 是只用spring Validator 校验机制使用 基于方法参数的校验对基本类型的校验 例如:以下服务触发第一个参数的验证,确保其大小在8到10之间: @Service@Validatedpublic cl 阅读全文
posted @ 2020-01-13 11:54 盲目的拾荒者 阅读(3271) 评论(0) 推荐(0)
摘要:之前习惯的配置方式: spring.datasource.driver-class-name=com.mysql.jdbc.Driver 控制台报如下警告: Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driv 阅读全文
posted @ 2020-01-13 11:53 盲目的拾荒者 阅读(1834) 评论(0) 推荐(0)
摘要:规范详细说明 1.遵循标准RESTful API 2.异常采用枚举进行封装(业务内部异常往上抛,返回客户端需要将对应的异常转换为具体的状态的,这里介绍Spring提供的全局异常处理) package org.niugang.coding.advice; import lombok.extern.sl 阅读全文
posted @ 2020-01-13 11:51 盲目的拾荒者 阅读(420) 评论(0) 推荐(0)
摘要:https://gitee.com/niugangxy/sprigboot-new-coding-standards/tree/master/new-coding-standards-jwt 微信公众号 ​ 阅读全文
posted @ 2020-01-13 11:48 盲目的拾荒者 阅读(281) 评论(0) 推荐(0)
摘要:后端技术:SpringBoot2.x 页面:freemarker webuploader:http://fex.baidu.com/webuploader/getting-started.html 1.application.properties server.port=9999 spring.fr 阅读全文
posted @ 2020-01-13 11:28 盲目的拾荒者 阅读(954) 评论(0) 推荐(0)
摘要:## spring.servlet.multipart.max-file-size=3072MB spring.servlet.multipart.max-request-size=3072MB 报红单位设置有问题,注意大小写 ​ 如果你想指定该文件不受限制,将spring.servlet.mult 阅读全文
posted @ 2020-01-13 11:25 盲目的拾荒者 阅读(2559) 评论(0) 推荐(0)
摘要:<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-freemarker</artifactId> </dependency> 模板位置 ​ 注:springboot中fre 阅读全文
posted @ 2020-01-13 11:21 盲目的拾荒者 阅读(1456) 评论(0) 推荐(0)
摘要:在 Spring Boot 中使用 Filter 与前面的使用 Servlet 相似,根据 Filter 注册方式的不同,有两种使用方式。若使用的是 Servlet3.0+版本,则两种方式均可使用;若使用的是 Servlet2.5版本,则只能使用配置类方式。 1.注解方式 若使用的是 Servlet 阅读全文
posted @ 2020-01-13 11:02 盲目的拾荒者 阅读(946) 评论(0) 推荐(0)
摘要:定时任务1 定时任务2 配置类 微信公众号 阅读全文
posted @ 2020-01-13 09:35 盲目的拾荒者 阅读(248) 评论(0) 推荐(0)