1.Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2.Caused by: java.lang.IllegalStateException: Invalid mapping on handler class [com.atguigu.redis.Controller.DempController]: public com.atguigu.redis.bean.Department com.atguigu.redis.Controller.DempController.getDepartment(java.lang.Integer)
3.Caused by: org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'id' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext' - maybe not public or not valid?
4.Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'id' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext' - maybe not public or not valid?
错误原因(加了#号)
@GetMapping(value = "/getDepartment/#{id}")