How do app servers inject into private fields?

前端 未结 3 1046
孤城傲影
孤城傲影 2021-02-08 04:13

I saw this question

Inject into private, package or public field or provide a setter?

about how to manually inject into annotated private fields (The way is addi

3条回答
  •  悲&欢浪女
    2021-02-08 05:03

    It's also worth noting, that some frameworks utilize bytecode engineering via a custom classloader to achieve the same result without the cost of Reflection (reflection can be pretty expensive at times)

提交回复
热议问题