springboot Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'name22' in

SpringBoot项目报错解决:“Error starting ApplicationContext. To display the conditions report re-run ...” SpringBoot项目报错:以下方案80%可以帮助您解决这些个‘可恶的’问题报错内容和截图如下: ( ( )___ | '_ | '| | ’ / ` | / )| |)| | | | | || (| | ) ) ) ) ’ || .__|| ||| |, | / / / / =========||==============|/=///_/ :: Spring Boot :: (v2.3.10.RELEASE) ——在看到这些个问题的时候,日志基本都会告诉你错误的地方,所以我们大部分 阅读详情

springboot Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder ‘name22’ in value “${name22}” 错误解决:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-08-23 18:12:53.816 ERROR 12108 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'name22' in value "${name22}"
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:379) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1350) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:580) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$144/1493158871.getObject(Unknown Source) ~[na:na]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE]
	at springcloud.service.ServiceApplication6012.main(ServiceApplication6012.java:14) [classes/:na]
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'name22' in value "${name22}"
	at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:172) ~[spring-core-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:124) ~[spring-core-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:237) ~[spring-core-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:211) ~[spring-core-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.lambda$processProperties$0(PropertySourcesPlaceholderConfigurer.java:175) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$$Lambda$170/1495161082.resolveStringValue(Unknown Source) ~[na:na]
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:839) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1086) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:584) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:373) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    ... 18 common frames omitted

Disconnected from the target VM, address: '127.0.0.1:52885', transport: 'socket'

springboot启动时会检索 @Value 对应配置文件中的key,当该key不存在时就会报:Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder异常,解决方案有两种:

1,设置 @Value 的默认值

@Value("${name22:default_name}")
private String name22;

上面代码中,当配置文件中 name22 key 不存在时,就会使用“default_name”作为默认值,key 与默认值用“:”符号分割。

2,在 Application 类中设置PropertySourcesPlaceholderConfigurer类的默认属性

// 设置@Value注解取值不到忽略(不报错)
@Bean
public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() {
    PropertySourcesPlaceholderConfigurer c = new PropertySourcesPlaceholderConfigurer();
    c.setIgnoreUnresolvablePlaceholders(true);
    return c;
}
Jeecg-Boot企业级低代码开发实战:Spring Boot3+Vue3环境搭建与Online表单应用 低代码开发平台是提升Java企业应用交付效率的关键技术路径,其核心在于平衡开发自由度与自动化能力。Jeecg-Boot作为成熟开源方案,基于Spring Boot 3与Vue3技术栈,通过在线表单配置、AI辅助建模和可合并代码生成,实现零代码快速建模与高自由度二次开发的统一。它支持MySQL/Oracle/达梦等多数据库,深度适配信创环境,并提供OAuth2.1安全框架与微服务扩展能力。本文聚焦真实项目落地场景,详解JDK17+、Node.js20+、Vite6、pnpm9等关键环境配置要点,以及Docke 阅读详情

相关推荐

error starting applicationcontext. to display the conditions report re-run y

主要错误:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. 未能配置数据源:未指定“url”属性,也无法配置嵌入式数据源。

计算机毕业论文源码,学生个人网页制作html源码。贴近用户做网络推广和互联网优化。 1万+

springboot启动报错:Error starting ApplicationContext. To display the auto-configuration report re-run yo

今天想做个分布式的小demo,结果跑springboot的时候出错: log4j:ERROR Could not find value for key log4j.appender.socket log4j:ERROR Could not instantiate appender named "socket". . ____ _ __ _ _ ...

灰太狼 10万+

解决Error starting ApplicationContext.To display the conditions report re-run your application xxx的问题

今天在项目启动类中,加上这行代码`@MapperScan("com.**.mapper")`后,报出了如是错误:Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.解决这个错误之后,又列举了这种错误的其他解决方式。......

念兮为美 13万+

java.lang.IllegalArgumentException: Could not resolve placeholder 'my.name' in value "${my.name}"

创建spring boot项目,在配置文件application.properties中添加属性,运行后出现标题错误。 添加的属性为: my: name:doudou age:22 解决方法:将application的后缀改成yml,并在其内容中属性名后面的冒号后加个空格。 my: name: doudou age: 22 ...

yikouyigedou的博客 656

error starting applicationcontext. to display the conditions report re-run y完美解决

​Error starting ApplicationContext. To display the conditions report re-run y解决办法1、加conponent注解。我在controller层下的这个类用的是rescontroller注解,然后没有加conponent注解,然后我就加上去试了一下,希望对你们有所帮助,加上注解重启就能解决。2、如果用idea软件的小伙伴,解决方法:管理员身份打开idea...

计算机毕业论文源码,学生个人网页制作html源码。贴近用户做网络推广和互联网优化。 7万+

发那科机器人Modbus通讯配置全攻略:从IP设置到信号调试

本文详细介绍了发那科机器人Modbus通讯的配置方法,从基础认知到IP设置、端口配置、信号调试及故障排查。重点讲解了UOP和DI/DO信号的配置技巧,帮助工程师快速实现机器人与PLC的稳定通讯,提升自动化系统效率。

weixin_27872611的博客 620

Error starting ApplicationContext. To display the conditions report re-run your

解决该BUG需要观察Description和Action这俩部分的提示,因为Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.这个报错包含很多的类型。这里报错的分析是:有另一个工程正在启用8080端口,因此造成了端口的被占用,所以,需要先释放端口。释放端口8080后重新运行.

weixin_62636680的博客 1万+

测试丢包_电信IPRAN承载LTE业务丢包故障处理案例

银川 景旭阳电信IPRAN承载LTE业务丢包故障处理案例一.故障现象某地市IPRAN网络承载LTE基站业务,客户反馈近期丢包严重,基站侧ping侧核心网EPC丢包达到10%左右;且基站数量在10个左右,并分布在同一地区,需要IPRAN网络协助排查;随后查看了IPRAN网络;发现这些业务所在基站的PW-BFD历史告警存在频繁的UP/DOWN告警;综上信息展开故障处理,初步判断由于BFD频繁...

weixin_29740921的博客 1910

Spring Boot 启动错误:Error starting ApplicationContext. To display the conditions report re-run your app

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2018-07-28 00:09:54.098 ERROR 5412 --- [ main] o.s.b.d.LoggingFailureAnalysi...

Shiwei_Xiong的博客 12万+

【论文阅读|小目标分割算法ASF-YOLO】

论文题目:ASF-YOLO: A novel YOLO model with attentional scale sequence fusion for cell instance segmentation 论文链接: https://arxiv.org/abs/2312.06458 代码链接:https://github.com/mkang315/ASF-YOLO 摘要(Abstract) 作者提出了一种新颖的基于 "You Only Look Once"(YOLO)的注意力尺度序列融合框架(ASF-YO

dally2的博客 8118

在matlab中运行自带的模块(以CCSDS LDPC Decoder模块为例)

最新版的获取需要注册 MathWorks 账户 访问账户注册页面:www.mathworks.cn/mwaccount/register。下载新版本或历史版本的MATLAB,请登陆:https://www.mathworks.cn/downloads 并下载。点击此处可以拷贝调用例程的命令,在matlab命令行输入即可自动获取代码。可以看到页面中写了该模块需要在R2022b以上版本使用。运行.m文件可以生成simulink运行所需要的数据。可以看到左侧下载到了官方历程的文件。之后双击slx文件即可打开。

qq_28455081的博客 885

Error starting ApplicationContext. To display the conditions report re-run your application with ‘de

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

s17856147699的博客 2万+

从零开始:Basler相机与pylon Viewer的工业视觉入门指南

本文详细介绍了Basler相机与pylon Viewer在工业视觉系统中的入门指南,涵盖硬件连接、软件安装、核心功能解析及实战案例。通过pylon Viewer的全面控制和参数调整功能,帮助新手快速掌握工业视觉检测技术,提升生产效率。

julia4scientist的博客 1134

Error starting ApplicationContext. To display the conditions report re-run your application with

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

记录和分享属于我的“IT”时光。 9830

如何利用东南大学齿轮箱数据集进行故障诊断?从数据采集到模型训练全流程解析

本文详细解析如何利用东南大学齿轮箱数据集进行故障诊断,涵盖从数据采集到模型训练的全流程。通过信号预处理、特征工程构建及多种机器学习模型对比,帮助开发者高效实现工业设备健康管理。特别适合希望将AI技术应用于工业场景的Python开发者。

m2n3b4v5c6的博客 375

华南理工大学电子与信息学院23年预推免复试面试经验贴

华南理工大学电子与信息学院23年预推免复试面试经验贴

Scut_Ty的博客 3295

启动简单的springboot项目报错:To display the conditions report re-run your..Web server failed to start

先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在。深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小。因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。XXX是自定义的端口号,端口号默认为8080,此处可以自行修改。此行意思是,启动项目时出错,如果想要详细报告,需调试(debug)程序。...

m0_67402914的博客 3782

YOLOv11的元学习(MAML)few-shot适配-(5样本内快速适应新类别)

本文提出了一种基于元学习和YOLOv11的少样本目标检测方法。首先介绍了元学习的核心概念和MAML算法原理,分析了YOLOv11的架构改进及其在少样本检测中的适用性。针对少样本检测面临的过拟合、特征混淆和定位困难等挑战,提出了基于MAML的解决方案。在实现方面,详细阐述了环境配置、数据预处理和任务采样策略,构建了支持N-way K-shot任务的数据加载器。实验表明,该方法相比传统微调策略可显著提升小样本场景下的检测性能。

本博客聚焦 YOLOv11 全流程落地,涵盖架构优化、数据集处理、训练技巧与多场景部署,兼及国产数据库、Java 开发与 AI 模型应用,内容兼顾理论与工程实践,为开发者提供系统干货,助力高效提升技术能力。 599

如何解决 Error starting ApplicationContext. To display the conditions report re-run your application

解决 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 的问题

猫头虎技术团队:授渔优于赠鱼,兴趣引领智慧,探索之乐尤显珍贵。商务合作+:Libin9iOak ,万粉变现+:优快云WF,猫头虎承诺每年免费为100名C站创作者做账号流量诊断服务!全网搜:猫头虎技术团队,点击文章底部名片或直接私信我一切皆可谈,快找虎哥! 6945

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

Spring Boot 项目运行时报错 Error starting ApplicationContext. To display the conditions report re-run your

yml文件中的content-type:text/html冒号中间没有用空格导致出错,颜色也不对。②、application.properties文件里面项出错了。①、配置的的application.yml里面项出错了,Spring Boot 项目运行时报错。每一项的后面是使用**=**连接。经过多方面的搜索查找找到的方法。== 主要看下面的错误 ==下次遇到不要在无脑找半天错了。

weixin_52498761的博客 5306

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

java.lang.IllegalArgumentException: Could not resolve placeholder

这个解决方式却很奇葩

qq_54640079的博客 2万+

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

简单bug(Spring Boot 启动错误:Error starting ApplicationContext. To display the conditions report re-run y)

在我注释了一个service层的实现类之后,一直显示启动错误,最后发现原因就在这里。

qyj226的博客 8927
上一篇: linux下安装JDK8
下一篇: 修改Mysql数据库默认字符集为utf8mb4
hwmhehe
博客等级 码龄13年 86粉丝 106原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值