jjzjj

SpringBoot教学

全部标签

Springboot实现Netty-websocket+rstp+ffmpeg+jsmpeg.js实现视频播放支持ws和http模式

思路1、前端是无法直接播放rstp推流来的视频,所以需要用ffmpeg进行转码。2、ffmpeg只能推送TCP或者HTTP协议还不支持ws协议。大致流程图。代码效果图。需要依赖Springboot+netty+ffmpeg-platformdependency>groupId>org.springframework.bootgroupId>artifactId>spring-boot-starter-webartifactId>dependency>dependency>groupId>org.projectlombokgroupId>artifactId>lombokartifactId>o

ELK 日志框架搭建 (springboot 接入 elk)

什么是ELK?ELK是一个开源的实时日志分析平台,它主要由Elasticsearch、Logstash和Kiabana三部分组成。LogstashLogstash主要用于收集日志,它是一个开源数据收集引擎,具有实时管道功能。Logstash可以动态地将来自不同数据源的数据统一起来,并将数据标准化到您所选择的目的地。Logstash收集数据的过程主要分为以下三个部分:输入:数据(包含但不限于日志)往往都是以不同的形式、格式存储在不同的系统中,而Logstash支持从多种数据源中收集数据(File、Syslog、https://cloud.tencent.com/product/cdb?from=

实现自定义SpringBoot的Starter组件

一、前言想要自定义starter组件,首先要了解springboot是如何加载starter的,也就是springboot的自动装配机制原理。1.1、starter加载原理springboot通过一个@SpringBootApplication注解启动项目,springboot在项目启动的时候,会将项目中所有声明为Bean对象(注解、xml)的实例信息全部加载到ioc容器当中。除此之外也会将所有依赖到的starter里的bean信息加载到ioc容器中,从而做到所谓的零配置,开箱即用。1.1.1、加载starter首先通过通过注解@SpringBootApplication找到@EnableAu

java - Springboot @ServerEndPoint "Failed to find the root WebApplicationContext."

我在使用带@ServerEndPoint注释类的spring时遇到问题我正在使用Springboot1.2.3,我正在尝试弄清楚如何拥有端点的单个实例@SpringBootApplication@EnableJpaRepositories@EnableWebSocketpublicclassApplicationServer{publicstaticvoidmain(String[]args){SpringApplication.run(ApplicationServer.class,args);}}Spring配置:@ConditionalOnWebApplication@Confi

java - SpringBoot 2.1.x中使用RestTemplateBuilder的requestFactory自定义RestTemplate不向下兼容1.5.x版本

在SpringBoot1.5.x中,我创建了一个自定义RestTemplate,如下所示:@BeanpublicRestTemplaterestTemplate(RestTemplateBuilderrestTemplateBuilder){PoolingHttpClientConnectionManagerpoolingConnectionManager=newPoolingHttpClientConnectionManager();poolingConnectionManager.setMaxTotal(restTemplateProps.getMaxConnectionsPerP

java - 我应该如何将 JpaRepository.findOne() 与 SpringBoot 一起使用?

我刚开始通过阅读SpringBootinAction这本书来学习SpringBoot,我正在学习这本书的示例,尝试自己运行它们,但我有一个使用JpaRepository.findOne()时出现问题。我已经遍历了整章来寻找我可能的不匹配之处。但是,它就是行不通。该项目应该是一个简单的阅读列表。代码如下:读者@Entity:packagecom.lixin.readinglist;importorg.springframework.data.annotation.Id;importorg.springframework.security.core.GrantedAuthority;imp

SpringBoot使用Gateway聚合Springdoc,Knife4j

SpringBoot使用Gateway聚合Springdoc,Knife4j前言同时支持springboot:3.0,springboot:2.0,使用gateway聚合springdoc,ui使用knife4j,解决由于nginx配置代理前缀导致的文档无法访问,不强依赖注册中心(nacos,zk,Eureka)有帮助的话记得点个赞哟!!!基础环境将所有依赖集成好作为一个本地包供其他项目使用jdk17maven3.6+springboot3.0+|springboot2.0+springcloud:2022.0.1springcloud-alibaba:1.8.1-2022.0.0-RC2sp

java - 如何在Springboot Restcontroller中使用PUT方法?

我正在使用Springboot开发应用程序。我尝试使用所有表示动词,如GET、POST、DELETE,它们都工作正常。通过使用PUT方法,它在springboot中不支持。我是否需要添加任何新配置。Put方法仅适用于没有任何参数的请求。如果我添加任何查询参数或表单数据,它就不起作用。请任何专家帮助我解决这个问题。@RequestMapping("/student/info")@RequestMapping(method=RequestMethod.PUT)public@ResponseBodyStringupdateStudent(@RequestParam(value="stdNam

java - application.properties 中的 SpringBoot 未知属性

我使用嵌入式Tomcat+Thymeleaf模板引擎,使用SpringInitializr生成了一个SpringBootWeb应用程序。我把这个属性放在我的application.properties中default.to.address=nunito.calzada@gmail.com我正在使用SpringToolSuiteVersion:3.8.4.RELEASE作为开发环境,但我在编辑器中收到此警告'default.to.address'isanunknownproperty.我应该把这个属性放在另一个属性文件中吗? 最佳答案

3.【SpringBoot源码】SpringBoot自动配置原理

目录一、简介1)、@SpringBootConfiguration2)、@ComponentScan3)、@EnableAutoConfiguration二、@AutoConfigurationPackage三、@Import(AutoConfigurationImportSelector.class)1)、AutoConfigurationImportSelector介绍2)、自动配置流程2-1)、ConfigurationClassParser#parse()2-2)、this.deferredImportSelectorHandler.process()2-2-1)、第一步:regist