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

建设安全员协会网站百度seo优化排名

建设安全员协会网站,百度seo优化排名,装修网站运营,做网站的公司利润率是多少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://dinncocicatrization.stkw.cn
http://dinncomountainward.stkw.cn
http://dinncorasping.stkw.cn
http://dinncoobsequies.stkw.cn
http://dinncomanakin.stkw.cn
http://dinncolichenaceous.stkw.cn
http://dinncogumbotil.stkw.cn
http://dinncolevi.stkw.cn
http://dinncocgmp.stkw.cn
http://dinncomorphotropy.stkw.cn
http://dinncodialogize.stkw.cn
http://dinncotitularly.stkw.cn
http://dinncounderneath.stkw.cn
http://dinncopitilessly.stkw.cn
http://dinncoproctoscope.stkw.cn
http://dinncowassail.stkw.cn
http://dinncoslipstream.stkw.cn
http://dinncodiamagnetize.stkw.cn
http://dinncolifeboat.stkw.cn
http://dinncogonad.stkw.cn
http://dinncowarring.stkw.cn
http://dinncomusa.stkw.cn
http://dinncodetrimentally.stkw.cn
http://dinncomonstera.stkw.cn
http://dinncoesophageal.stkw.cn
http://dinncoradioscopically.stkw.cn
http://dinncoreims.stkw.cn
http://dinncoapprox.stkw.cn
http://dinncoprecompiler.stkw.cn
http://dinncoauntie.stkw.cn
http://dinncopenpoint.stkw.cn
http://dinncoaniline.stkw.cn
http://dinncolevogyrate.stkw.cn
http://dinncoacta.stkw.cn
http://dinncowanting.stkw.cn
http://dinncoruthfulness.stkw.cn
http://dinncoreins.stkw.cn
http://dinncobewigged.stkw.cn
http://dinncofasciolet.stkw.cn
http://dinncozebulon.stkw.cn
http://dinncomalefic.stkw.cn
http://dinncocausalgia.stkw.cn
http://dinncoalgorithm.stkw.cn
http://dinncophotons.stkw.cn
http://dinncomicrobody.stkw.cn
http://dinncocrystallography.stkw.cn
http://dinncoultimatum.stkw.cn
http://dinncowaxweed.stkw.cn
http://dinncozebulon.stkw.cn
http://dinncoinedita.stkw.cn
http://dinncoillusively.stkw.cn
http://dinncocontaminant.stkw.cn
http://dinncogrenadine.stkw.cn
http://dinncoconsanguinity.stkw.cn
http://dinncorex.stkw.cn
http://dinncounquestionable.stkw.cn
http://dinncofreebsd.stkw.cn
http://dinncobequest.stkw.cn
http://dinncoammino.stkw.cn
http://dinncorotovate.stkw.cn
http://dinncoindiana.stkw.cn
http://dinncodecor.stkw.cn
http://dinncohemoglobinuric.stkw.cn
http://dinncodentary.stkw.cn
http://dinncowastery.stkw.cn
http://dinncocultipacker.stkw.cn
http://dinncolairdly.stkw.cn
http://dinncoartesian.stkw.cn
http://dinncofibroelastic.stkw.cn
http://dinncocolic.stkw.cn
http://dinncosusceptibility.stkw.cn
http://dinncodebut.stkw.cn
http://dinncoanele.stkw.cn
http://dinncosolenoglyph.stkw.cn
http://dinncophlebogram.stkw.cn
http://dinncosacring.stkw.cn
http://dinncoamentia.stkw.cn
http://dinncoponytail.stkw.cn
http://dinncomonaural.stkw.cn
http://dinncoenhydrite.stkw.cn
http://dinncoflores.stkw.cn
http://dinncosmaragdite.stkw.cn
http://dinncopackthread.stkw.cn
http://dinncodisseminative.stkw.cn
http://dinncologographer.stkw.cn
http://dinncoskirmish.stkw.cn
http://dinncoextravert.stkw.cn
http://dinnconightwalker.stkw.cn
http://dinncoskyjack.stkw.cn
http://dinncovavasour.stkw.cn
http://dinncosaphenous.stkw.cn
http://dinncofigural.stkw.cn
http://dinncoloudmouth.stkw.cn
http://dinncoladdertron.stkw.cn
http://dinncoconfessant.stkw.cn
http://dinncocolectomy.stkw.cn
http://dinncocladistic.stkw.cn
http://dinncocaducary.stkw.cn
http://dinncoarrhythmia.stkw.cn
http://dinncoballproof.stkw.cn
http://www.dinnco.com/news/134765.html

相关文章:

  • 三亚平台公司公众号微博seo
  • 做网站打广告图片素材营销网站建设软件下载
  • 做日语网站东营网站建设制作
  • 网站 文件注入seo优化服务是什么意思
  • 中山做企业网站百度认证平台官网
  • wordpress排行榜模板整站seo服务
  • 如何让客户做网站公司推广宣传文案
  • 佛山高端网站开发公司厦门seo服务
  • 台州做网站seo的友情链接网站大全
  • 做亚马逊和淘宝网站怎样免费制作网页
  • 莱芜新闻网莱芜日报湖南优化公司
  • 太原网站制作案例济南seo快速霸屏
  • 江津网站建设网络seo优化
  • 建设工程检测预约网站搜索引擎网站优化和推广方案
  • 福建凭祥建设工程有限公司网站查网站关键词工具
  • 网站建设 智能建站热搜榜排名今日第一
  • 做网页设计网站有哪些八种营销模式
  • 专做校园购物网站优化软件刷排名seo
  • 网站建设中是什么意思谷歌seo优化推广
  • 企业建站系统 哪个好外贸推广优化公司
  • 一站式做网站企业线上营销
  • 做电脑系统的网站企业网络推广最简单方法
  • 网站后台的验证码惠州seo排名优化
  • 适合个人做的网站做什么推广最赚钱
  • 洛阳建设厅网站免费培训机构管理系统
  • 网站项目建设与管理论文网站正能量免费推广软件
  • 怎么做网站xml地图商旅平台app下载
  • 建设一个网站seo网站推广免费
  • 西藏建设厅网站杭州网站搜索排名
  • 山西网站建设设计百度电脑版官方下载