当前位置: 首页 > news >正文

直播网站开发要多久wordpress视频

直播网站开发要多久,wordpress视频,电脑iis做网站,建设网站容易吗2.2.11.RELEASE > 2.7.4项目更新spring-boot-starter-parent 主依赖,导致项目跑不起了日志也没有输出有用信息,自己查看源码调试启动入口打断点,一步步进入方法定位项目停止代码我的项目执行到SpringApplication.class 的152行代码会停止项…

2.2.11.RELEASE ===> 2.7.4

项目更新spring-boot-starter-parent 主依赖,导致项目跑不起了

日志也没有输出有用信息,自己查看源码调试

启动入口打断点,一步步进入方法定位项目停止代码

我的项目执行到SpringApplication.class 的152行代码会停止项目

1、org.springframework.boot.context.config.InactiveConfigDataAccessException: Inactive property source 'Config resource 'class path resource [application.properties]' via location 'optional:classpath:/'' imported from location 'class path resource [application.properties]' cannot contain property 'spring.profiles.active' [origin: class path resource [application.properties] - 1:24]

application.properties

弃用:spring.profiles.active=dev 转换:spring.config.activate.on-profile=dev(如果没有报错可以不管)

2、java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.ser.std.ToStringSerializerBase

升级:jackson 版本 2.10以上

ToStringSerializerBase是jackson2.10新增的类

3、org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'winMigrationImpl': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.driver-class-name' in value "${spring.datasource.driver-class-name}"

报错:SpringApplication.class 158行 this.refreshContext(context);

Error creating bean with name 'winMigrationImpl': Injection of autowired dependencies failed

原因:没有读取到配置文件

解决:

https://huaweicloud.csdn.net/63a56ef7b878a54545946e55.html?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2~default~OPENSEARCH~activity-1-105632264-blog-129064755.pc_relevant_3mothn_strategy_recovery&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2~default~OPENSEARCH~activity-1-105632264-blog-129064755.pc_relevant_3mothn_strategy_recovery&utm_relevant_index=1

4、项目循环引用

按提示添加 配置 spring.main.allow-circular-references=true

5、PatternsRequestCondition.getPatterns()报错:"this.condition" is null

https://blog.didispace.com/swagger-spring-boot-2-6/

Spring Boot整合Swagger问题

解决:

1、添加配置项

spring.mvc.pathmatch.matching-strategy=ant_path_matcher

2、webconfig添加 (单独第一步不行,就两个都加上)

import org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties;
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementPortType;
import org.springframework.boot.actuate.endpoint.ExposableEndpoint;
import org.springframework.boot.actuate.endpoint.web.*;
import org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpointsSupplier;
import org.springframework.boot.actuate.endpoint.web.annotation.ServletEndpointsSupplier;
import org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.Environment;
import org.springframework.util.StringUtils;import java.util.ArrayList;
import java.util.Collection;
import java.util.List;@Bean
public WebMvcEndpointHandlerMapping webEndpointServletHandlerMapping(WebEndpointsSupplier webEndpointsSupplier, ServletEndpointsSupplier servletEndpointsSupplier, ControllerEndpointsSupplier controllerEndpointsSupplier, EndpointMediaTypes endpointMediaTypes, CorsEndpointProperties corsProperties, WebEndpointProperties webEndpointProperties, Environment environment) {List<ExposableEndpoint<?>> allEndpoints = new ArrayList();Collection<ExposableWebEndpoint> webEndpoints = webEndpointsSupplier.getEndpoints();allEndpoints.addAll(webEndpoints);allEndpoints.addAll(servletEndpointsSupplier.getEndpoints());allEndpoints.addAll(controllerEndpointsSupplier.getEndpoints());String basePath = webEndpointProperties.getBasePath();EndpointMapping endpointMapping = new EndpointMapping(basePath);boolean shouldRegisterLinksMapping = this.shouldRegisterLinksMapping(webEndpointProperties, environment, basePath);return new WebMvcEndpointHandlerMapping(endpointMapping, webEndpoints, endpointMediaTypes, corsProperties.toCorsConfiguration(), new EndpointLinksResolver(allEndpoints, basePath), shouldRegisterLinksMapping, null);
}private boolean shouldRegisterLinksMapping(WebEndpointProperties webEndpointProperties, Environment environment, String basePath) {return webEndpointProperties.getDiscovery().isEnabled() && (StringUtils.hasText(basePath) || ManagementPortType.get(environment).equals(ManagementPortType.DIFFERENT));
}

6、java.lang.NoSuchMethodError: org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties.getServlet()Lorg/springframework/boot/actuate/autoconfigure/web/server/ManagementServerProperties$Servlet;

依赖升级到2.4.1,原2.3.1版本没有这个方法

<!-- 监控健康-->
<dependency><groupId>de.codecentric</groupId><artifactId>spring-boot-admin-starter-client</artifactId><version>2.4.1</version>
</dependency>

6、IllegalArgumentException: When allowCredentials is true, allowedOrigins cannot contain the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response header. To allow credentials to a set of origins, list them explicitly or consider using "allowedOriginPatterns" instead.

IllegalArgumentException: When allowCredentials is true, allowedOrigins cannot contain the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response header. To allow credentials to a set of origins, list them explicitly or consider using "allowedOriginPatterns" instead.

解决:

项目配置 MipsConf.class

@Bean
public WebMvcConfigurer corsConfigurer() {    return new WebMvcConfigurer() {        @Override        public void addCorsMappings(CorsRegistry registry) {            registry.addMapping("/**")                    //.allowedOrigins("*")                    .allowedOriginPatterns("*")                    .allowCredentials(true).allowedMethods("GET", "POST", "DELETE", "PUT","PATCH").maxAge(3600);}};
}

allowedOrigins("*") 替换成 allowedOriginPatterns("*")

7、fastjson 升级 1.2.83

以前版本有漏洞,1.2.83 修复

http://www.yayakq.cn/news/214670/

相关文章:

  • 中国建设银行网站怎么登录不上展示型网站建设方案
  • 汽车网站建设价格做站群网站好优化吗
  • 温州市建设工程招投标网站最新企业所得税优惠政策2023年
  • 杭州网站优化多少钱wordpress网站空白
  • 网站快速收录平台网站建设优化广告流量
  • 南京企业网站设计注册网站地址
  • 重庆网站推广多少钱wordpress网站名
  • 上海网站建设外贸工程综合承包
  • 网站设计公司网两学一做纪实评价系统网站
  • 装修素材图片都从什么网站找Wordpress收起小工具
  • 泰安网站设计wordpress 宠物
  • 用php做的大型网站徐州做网站优化
  • 亚马逊网站怎么做wordpress流量赚钱
  • 淘宝客网站哪里可以做惠民网站建设
  • 在线外链发布工具江门seo外包服务
  • 做金融网站看那些素材网址域名注册费用
  • 电商企业网站建设网络规划设计师薪资
  • 做搬家广告哪家网站有优wordpress二手房
  • 个人网站做产品网站建设有关的软件
  • iis发布网站后无法加载dll江西建设银行分行网站
  • 餐馆网站怎么做门户网站设计要求
  • 个人不能建设论坛网站怎么办深圳专业商城网站
  • 上海哪里可以做网站网站建设的时候如何上传图片
  • 做男女的那个视频网站ctoc网站有哪些
  • 企业网站建设的提案网站模板系统
  • 易瑞通网站建设wordpress用户权限在哪改
  • 深圳英文网站建设去哪家学校网站开发说明书文档
  • 模板网站与定制网站区别重庆城乡建设信息网官网
  • 河北建设工程招标投标协会网站做网站技术要求怎么写
  • 高端网站设计公司如何设计网站网页设计欣赏作业