Invalid mapping on handler class


Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'n' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext' - maybe not public or not valid?

 

 

太长时间没敲代码,当我们方法的形参要采用路径中输入的数据时,路径中采用 {value} ,不能添加任何#或者$,方法中的形参前面要使用@PathVariable("Value")注解,括号内部的Value对应路径上的{}内的n。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM