随笔分类 -  SpringBoot+Spring

SpringBoot+Spring
摘要:1.引入依赖 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <depende 阅读全文
posted @ 2021-05-18 20:01 SpecialSpeculator 阅读(112) 评论(0) 推荐(0) 编辑
摘要:优雅的sprongboot启动类 package fama.cost.server; import fama.cost.common.IStoppable; import fama.cost.common.thread.Stopper; import fama.cost.dao.utils.Bean 阅读全文
posted @ 2021-03-30 14:26 SpecialSpeculator 阅读(187) 评论(0) 推荐(0) 编辑
摘要:1.application.properties zookeeper.address=@mvn.zookeeper.address@ zookeeper.namespace=@mvn.zookeeper.namespace@ 2.pom.xml中多profile环境不同变量定义 <propertie 阅读全文
posted @ 2021-03-30 13:55 SpecialSpeculator 阅读(627) 评论(0) 推荐(0) 编辑
摘要:1.添加钩子函数,钩子函数中指定要调用的方法 @PostConstruct public void run() { this.zkClient.start(this); this.schedulerService.start(); try { logger.info("start Quartz se 阅读全文
posted @ 2021-03-26 11:32 SpecialSpeculator 阅读(240) 评论(0) 推荐(0) 编辑
摘要:发布到线上的包结构 runtime是发布到线上的目录结构 1.项目pom.xml添加打包配置 <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-pl 阅读全文
posted @ 2021-03-12 15:14 SpecialSpeculator 阅读(131) 评论(0) 推荐(0) 编辑
摘要:1.获取http头对象 // org.springframework.http.HttpHeaders private HttpHeaders getHttpHeaders() { HttpHeaders headers = new HttpHeaders(); headers.setAcceptC 阅读全文
posted @ 2021-01-05 11:16 SpecialSpeculator 阅读(199) 评论(0) 推荐(0) 编辑
摘要:@SpringBootApplication @ComponentScan(basePackages = {"demo.test"}) public class ReportApplication { private static final Logger logger = LoggerFactor 阅读全文
posted @ 2020-10-29 11:11 SpecialSpeculator 阅读(175) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示