Home  >  Q&A  >  body text

java - 下面这个EL表达式,可以取出item的值,可是item是封装起来的,属性都是private啊?

大家讲道理大家讲道理2723 days ago591

reply all(3)I'll reply

  • 怪我咯

    怪我咯2017-04-17 16:34:52

    The underlying get method uses reflection. If the name of your get method is changed, that is, the attribute is named name, and the get method to obtain name is getName1, then name1 must be used to obtain the value in el

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 16:34:52

    The bottom layer is getName

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 16:34:52

    Delete the getNamemethod and try again.
    If it cannot be accessed, it means that the getter method of the attribute is automatically called; otherwise, the value of the attribute should be taken directly through reflection.

    reply
    0
  • Cancelreply