草庐IT

关于引入maven项目后出现‘parent.relativePath’ of POM错误时的解决方法

项目场景:Springboot项目出现的依赖错误。问题描述在Springboot项目启动时,项目报错‘parent.relativePath’ofPOM问题,项目无法正常启动。原因分析:   发生该问题的根本原因是因为在项目文件夹的外层包含着另一个项目,此时项目文件无法确定该文件的pom依赖是引用哪一个parent依赖导致的。推荐使用方法二解决。解决方案:解决方法一在pom文件中spring-boot-starter-parent依赖中添加 属性.org.springframework.bootspring-boot-starter-parent2.3.12.RELEASE##添加relati

解决“Failed to start bean ‘documentationPluginsBootstrapper‘; nested exception is java.lang.NullPoint”

当你的spring-boot版本是2.6.x并且你的swagger版本是3.0.0以上的时候,项目启动会报错“org.springframework.context.ApplicationContextException:Failedtostartbean'documentationPluginsBootstrapper';nestedexceptionisjava.lang.NullPointerException”解决办法步骤一、添加配置spring:mvc:pathmatch:matching-strategy:ant_path_matcher步骤二、添加配置类importorg.spr

杂记——4.书写spring时出现的Error creating bean with name ‘user0‘ defined in file错误

目录1.问题描述2.情况描述:3.解决方法4.问题原因 1.问题描述当我们运行一个spring程序时,出现下图的错误:重点语句: Errorcreatingbeanwithname'user011'definedinfile[D:地址]: Unsatisfieddependencyexpressedthroughconstructorparameter0;nestedexceptionisorg.springframework.beans.factory.NoSuchBeanDefinitionException:Noqualifyingbeanoftype'int'available:exp

AttributeError: module ‘distutils‘ has no attribute ‘version‘解决跑pytorch代码报错

跑pytorch代码报错AttributeError:module‘distutils’hasnoattribute‘version’Traceback(mostrecentcalllast):File“D:/pycharm_envir/gaozhiyuan/Segmentation/pytorch_segmentation/deeplabv3-plus-pytorch-main/train.py”,line16,infromutils.callbacksimportLossHistory,EvalCallbackFile“D:\pycharm_envir\gaozhiyuan\Segment

AttributeError: module ‘distutils‘ has no attribute ‘version‘解决跑pytorch代码报错

跑pytorch代码报错AttributeError:module‘distutils’hasnoattribute‘version’Traceback(mostrecentcalllast):File“D:/pycharm_envir/gaozhiyuan/Segmentation/pytorch_segmentation/deeplabv3-plus-pytorch-main/train.py”,line16,infromutils.callbacksimportLossHistory,EvalCallbackFile“D:\pycharm_envir\gaozhiyuan\Segment

【错误】A component required a bean of type ‘org.springframework.security.config.annotation.ObjectPostPr

错误提示:Description:Acomponentrequiredabeanoftype'org.springframework.security.config.annotation.ObjectPostProcessor'thatcouldnotbefound.Action:Considerdefiningabeanoftype'org.springframework.security.config.annotation.ObjectPostProcessor'inyourconfiguration. 意思为:描述:组件需要“org.springframework.security.co

VS2022 IIS Express运行报错:Could not load file or assembly ‘xxxx‘ or one of its dependencies.

问题描述:VS2017,VS2019默认使用32位的IISExpress运行应用程序。但VS2022默认启用64位的IISExpress。如果项目中有dll必须运行在32位下,就会造成标题所示的错误。解决办法:VS2022中工具=》选项=》项目与方案=》Web项目下将“使用64位的IISExpress”选项勾掉就可以了。 

python安装GDAL,解决ModuleNotFoundError: No module named ‘osgeo‘

项目场景:提示:这里简述项目相关背景:需要读取tif格式的遥感影像问题描述提示:这里描述项目中遇到的问题:ModuleNotFoundError:Nomodulenamed‘osgeo‘python中代码:fromosgeoimportgdal,osr,ogr本以为直接pipinstallgdal即可,发现执行报错;原因分析:提示:这里填写问题的分析:未安装python版本的GDAL库,安装GDAL需要whl文件。解决方案:提示:这里填写该问题的具体解决方案:在GDAL库的网站(https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal)找到符合自己配置的

AttributeError:‘CartPoleEnv‘ object has no attribute ‘seed‘解决方案

前言在尝试运行gym的classic control模块中的CartPole的相关代码时,想用随机种子重置一下环境,结果不停的报AttributeError:'CartPoleEnv'objecthasnoattribute'seed'的错,查看gym的官方文档后也没有得出什么结果。后来,意外发现了在另外一台机器上运行该代码的警告信息:gym/core.py:256:DeprecationWarning:WARN:Function`env.seed(seed)`ismarkedasdeprecatedandwillberemovedinthefuture.Pleaseuse`env.reset