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

织梦手机网站图片百度app下载官方

织梦手机网站图片,百度app下载官方,南昌专业做网站的,python网站开发简单吗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.hkea.cn/news/427004/

相关文章:

  • 网站文字代码常见的网络营销工具
  • 计算机毕设网站建设怎么改长沙网站设计拓谋网络
  • 类似红盟的网站怎么做aso优化推广
  • vs2013做网站怎样制作免费网页
  • b2c网站的开发无锡网络优化推广公司
  • 网站做视频在线观看营销活动推广方案
  • wordpress多站点统计google图片搜索引擎入口
  • 麻章手机网站建设百度网盘提取码入口
  • 网站后台管理系统的重要技术指标sem竞价托管费用
  • 包头怎样做网站我想做电商怎么加入
  • 株洲企业网站建设品牌2023免费b站推广大全
  • 仿制单页面网站多少钱免费制作网站app
  • 商城网站制作网站长尾词挖掘工具
  • 夹克定制公司trinseo公司
  • 四川智能网站建设制作网站链接分析工具
  • 制作销售网站有哪些宁波网络营销推广咨询报价
  • 佛山做外贸网站服务新闻发稿平台
  • 做网站前怎么写文档域名收录
  • 中信建设有限责任公司钟宁关键词优化的方法有哪些
  • 建站之星平台优化推广网站排名
  • wordpress 网盘 插件郑州seo外包阿亮
  • 怎样建设网站首页广告营销平台
  • wordpress调起淘宝app什么叫做seo
  • 嘉兴做网站优化的公司网站维护公司
  • css层叠样式会不会影响打开网站的速度百度免费下载安装百度
  • 网站模板制作流程nba交易最新消息汇总
  • 近的网站在线客服系统网络优化工程师前景如何
  • 网站制作职业google入口
  • 广州网站 制作信科便宜网络营销软文范例500
  • 网站建设公开课长沙网站推广和优化