Property or field 'str' cannot be found on object of type 'com.yubai.EL.DemoService' - maybe not pub

最新小旋风蜘蛛池X6.21解密版+绕过授权带教程 介绍: 1.站群管理:用你的域名在这里添加网站 2.站点优化:站点互链,内容优化 2.系统设置:开启蜘蛛池 3.采集管理(可开启自动采集) 4.缓存设置:推荐开启tkd缓存 其他的用户根据自己的实际情况后台进行配置,通常以下: 1.后台首页(这里显示系统的大致概况) 2.系统设置:蜘蛛池的基本设置(访问开关、跳转、统计等等) 3.站群管理: 1.网站管理(用你的域名在这里添加网站) 2.模型管理(可构建不同类型站点:电影、文章、论坛等等) 3.TKDB调用模板(即:title、keywords、descri 阅读详情

这里写图片描述

这里写图片描述

警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ELConfig': Unsatisfied dependency expressed through field 'str'; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'str' cannot be found on object of type 'com.yubai.EL.DemoService' - maybe not public?
Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ELConfig': Unsatisfied dependency expressed through field 'str'; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'str' cannot be found on object of type 'com.yubai.EL.DemoService' - maybe not public?
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
    at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:84)
    at com.yubai.EL.MainEl.main(MainEl.java:7)
Caused by: org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'str' cannot be found on object of type 'com.yubai.EL.DemoService' - maybe not public?
    at org.springframework.context.expression.StandardBeanExpressionResolver.evaluate(StandardBeanExpressionResolver.java:164)
    at org.springframework.beans.factory.support.AbstractBeanFactory.evaluateBeanDefinitionString(AbstractBeanFactory.java:1448)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1088)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
    ... 14 more
Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'str' cannot be found on object of type 'com.yubai.EL.DemoService' - maybe not public?
    at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:226)
    at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:94)
    at org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:46)
    at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:379)
    at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:88)
    at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:120)
    at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:262)
    at org.springframework.context.expression.StandardBeanExpressionResolver.evaluate(StandardBeanExpressionResolver.java:161)
    ... 18 more

Process finished with exit code 1

错误信息:

Property or field 'str' cannot be found on object of type 'com.yubai.EL.DemoService' - maybe not public?
  1. str这个属性在’com.yubai.EL.DemoService’中没有找到,意味着可能她是私有的

  2. @Value(“#{demoService.str}”)是通过访问demoService这个bean的所属类的对象的getStr()这个方法的,由于DemoService这个类的属性是私有属性,所以除过本类之外的类访问需要通过getXXX和setXXX方法。所以DemoService类必须提供getXXX方法才可以访问

注意:@Value(“ ”)这种访问方式是直接注入到此类的属性中,不通过setXXX方法

而在双引号中用#{}这种方式是通过getXXX方法访问获得值

然后把值注入到本类的属性中。直接通过对象.属性的方式访问

解决方法:打开DemoService类中的getXXX方法。如下图:

这里写图片描述

ue 打包linux程序 在windows系统 2026 ue 打包linux程序 在windows系统 2026 阅读详情

相关推荐

AWS S3文件上传性能优化:Java SDK多线程与分段上传实战指南

本文详细介绍了如何通过Java SDK优化AWS S3文件上传性能,重点讲解多线程并发上传与分段上传(Multipart Upload)技术的实战应用。通过动态调整分段策略、线程池配置及内存优化技巧,可显著提升大文件上传效率,实测显示组合方案比单线程上传提速近5倍。文章还涵盖加密上传、断点续传等高级场景解决方案,并提供了完整的性能对比测试数据。

d6e7f8的博客 1016

EL1008E: Property or field ‘categoryAllKey‘ cannot be found on object of type ‘org.springframework.c

原因是我引入缓存时key使用的是常量:而我的常量为:解决办法:key在作为常量时,必须用单引号引起来:这样bug就解决了。

weixin_74545874的博客 498

FreeRTOS-Plus-CLI在STM32F429上的高效移植与调试技巧

本文详细介绍了如何将FreeRTOS-Plus-CLI高效移植到STM32F429平台,并分享关键的调试技巧。内容涵盖使用HAL库进行底层驱动适配(特别是DMA+IDLE中断方案)、工程集成、自定义命令开发以及常见问题解决方案,旨在帮助开发者快速为嵌入式系统添加强大的命令行调试接口,提升开发与维护效率。

weixin_29224309的博客 334

EL1008E: Property or field ‘config‘ cannot be found on object of type ‘org.springframework.beans.fac

EL1008E: Property or field 'config' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext'

ideal-lingyun 3204

HFSS15 win10_64位破解

HFSS15 win10_64位破解 找到的别人的软件,但在首次安装时失败了,并不能patched。寻找了几种方法,已成功安装。在此写下安装经验,供大家参考。 软件安装包以及破解软件: 链接:https://pan.baidu.com/s/1MMjV_31maU5QD6fmI4zfIA 提取码:yj4q 在安装之前,建议关闭杀毒软件。 Step1:进入HFSS150Win64安装包,点击au...

玉笙寒 4万+

1.毫米波雷达心率、呼吸原理实现(一)实例

毫米波雷达心率、呼吸检测原理本项目分两到三篇文章写完,第一阶段借鉴TI开源项目以及根据自己的见解适当更改信号处理链通过AWR1843汽车雷达传感器和DCA1000采集卡采集数据完成人体呼吸和心跳检测算法的实现。第二阶段将仿真成功的代码搬移TIAWR1843传感器并通过串口数据实现生命体征的实时处理。本文即为第一阶段实现过程。本文首先概述毫米波雷达呼吸心跳检测的原理,紧接着概述本项目信号处理流程,另外本项目第一阶段通过matlab仿真验证算法的有效性,仿真源码可关注小编并私信可取。1.概述。

Poulen的博客 2万+

spring(错误二) Error creating bean with name 'xxxx'

报错信息如下: [QPWA.WL] 2016-07-04 18:05:25 [ERROR] (ContextLoader.java:331) - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'alipayBa

babyZeng 2万+

【100%通过率】华为OD机试真题 Java&Go 实现【水库蓄水问题】【2022.11 Q4 新题】

给定一个长度为 n 的整数数组height。数组的元素表示山的高度,选择两个元素作为水库的边界,求蓄水量的最大值并输出蓄水量最大时的边界下标(蓄水量相同时输出下标较近的)。

MISAYAONE的博客 1万+

EL1008E: Property or field ‘lastMessage‘ cannot be found on object of type ‘java.util.HashMap‘

Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'lastMessage' cannot be found on object of type 'java.util.HashMap' - maybe not public or not valid? at org.springframework.expression.spel.ast.PropertyOrFi

qq_42956993的博客 4776

以阿克曼转向车为例对URDF和XACRO文件进行解读

   最近我在古月学院购买了在Gazebo中实现阿克曼转向车的仿真课程,课程资料的阿克曼小车的XACRO文件在Gazebo里加载的时候报了三个错误,在这之前,我没接触过URDF或XACRO文件,本篇文章就以这个阿克曼小车的XACRO文件为例,对URDF或XACRO文件的格式和内容进行解读,期望经过解读和学习,找到错误原因及所在,并解决这三个错误    先来放一下上面右图所示的模型的完整的XACRO文件: <?xml version="1.0"?> <!-- racecar.urdf.x

慕羽★的博客 3700

CMake入门教程【基础篇】在Windows、Linux上安装CMake

CMake如何下载与安装

小鱼酱的博客 2726

springboot 异常 org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or fiel

org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'timestamp' cannot be found on object of type 'java.util.HashMap' - maybe not public? 使用LauItachi的项目WeChatPlatf...

xuqi1029的博客 3万+

FISCO BCOS(八)——— 一键部署 WeBase

环境 版本 Java Oracle JDK 8 至 14 MySQL MySQL-5.6及以上 Python Python3.6及以上 PyMySQL 1、获取部署安装包: wget https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/WeBASE/releases/download/v1.5.4/webase-deploy.zip 2、解压安装包: unzip webase-deploy.zip 3、进入目录: c...

林中有神君 3607

EL1008E:属性或字段不能在org.springframework.cache.interceptor.CacheExpressio

是因为 @Cacheable(key=“banner”,value = “IndexList”)不能识别。在key中加入一对单引号,即可解决报错。

qq_41473691的博客 1万+

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

EL1008E:Property or field cannot be found on object of type ‘com.fasterxml.jackson.databind.nod

然后又发现了,${result.get('dq')} 方式提取的string类型的内容带有双引号,需要${result.get('dq')}.textValue() 这样处理来去掉双引号。使用${result.dq} 报标题所示的错误,需要使用 ${result.get('dq')} 方式才可以。jackson 生成的json 对象,使用thymeleaf 进行解析的时候报错,

迎风飞翔的专栏 1279

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

Property or field ‘jdbc‘ cannot be found on object of type ‘org.springframework.beans.factory.config

Property or field ‘jdbc’ cannot be found on object of type ‘org.springframework.beans.factory.config.BeanExpressionContext’ - maybe not public or not valid? 错误: <!-- 2.加载了配置文件后还需要将里面的数据变成druid对象,,,,,加载druid对象【第三方的资源】--> <bean id="dataSource" cl

weixin_51631350的博客 2742

EL1008E: Property or field 'timestamp' cannot be found on object of type 'java.util.HashMap' - maybe

完整的异常信息: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 't...

无知人生,记录点滴 4万+

关于解决Property or field ‘id‘ cannot be found on object of type问题的思路

关于解决Property or field 'id' cannot be found on object of type问题的思路

f131619_0的博客 3974

Property or field ‘key‘ cannot be found on object of type ‘org.springframework.cache.interceptor.Ca

错误信息 org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'dc_PartEnumTypeInfo' cannot be found on object of type 'org.springframework.cache.interceptor.CacheExpressionRootObject' - maybe not public or not valid? at org

gkkljy的博客 2671

thymeleaf 报错解决EL1008E: Property or field ‘role_id‘ cannot be found on object of type ‘java.util.Hash

thymeleaf 报错解决EL1008E: Property or field ‘role_id’ cannot be found on object of type 'java.util.Hash 使用thymeleaf获取参数的时候报错: Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field ‘role_id’ cannot be found on objec

Big_king_de的博客 7127

redis整合异常总结

问题:org.springframework.expression.spel.SpelEvaluationException: EL1008E:(pos 0): Property or field 'getAll' cannot be found on object of type 'org.springframework.cache.interceptor.CacheExpressionRoot...

weixin_30747253的博客 293

Caused by: org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nes

Caused by: org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or f...

qq_45734323的博客 4040

spring中会报错org.springframework.beans.factory.BeanCreationException:

Error creating bean with name ‘address’ defined in class path resource [spring-spel.xml]: Initialization of bean failed警告: Exception encountered during context initialization - cancelling refresh attem

王伟的博客 3万+

工作中碰到的一些错误

Feign方面的错误 1、cannot be found on object of type ‘org.springframework.cache.interceptor.CacheExpressionRootObject’ 这个问题是使用@Cacheable注解时key的值没有加单引号导致的,正确用法 @Cacheable(value=“users”, key=&amp;quot;‘users’&amp;quot;) 2、Meth...

zhanglinlove的博客 431

Property or field ‘xxx‘ cannot be found on object of type ‘org.xx.xxObject‘ - maybe not public?问题解决

Property or field 'xxx' cannot be found on object of type 'org.xx.xxObject' - maybe not public?问题解决。

born_stubborn的博客 3488

spring整合mybatis EL1008E: Property or field ‘driverClassName’ cannot be found on object of type ‘o

请教,spring整合mybatis时出现错误怎么办 Exception in thread “main” org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘studentMapper’ defined in class path resource [application...

qq_44550513的博客 2487

.SpelEvaluationException: EL1008E: Property or field ‘cache_department_list_Tree‘ cannot be found

报错如题:.SpelEvaluationException: EL1008E: Property or field 'cache_department_list_Tree' cannot be found on object of type 'org.springframework.cache.interceptor.CacheExpressionRootObject' - maybe not ...

愿我如星君如月 ... 夜夜流光相皎洁 ... 2万+
上一篇: Property or field 'demoService1' cannot be found
下一篇: cannot resolve symbol 'Resource'
脾气很倔呢
博客等级 码龄9年 190粉丝 309原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值