什么是Java Bean,What is a Spring Bean?

以你之姓@ 2024-03-25 14:02 187阅读 0赞

Here’s a definition of beans in the Spring Framework documentation:

In Spring, the objects that form the backbone of your application and that are managed by the Spring IoC container are called beans. A bean is an object that is instantiated, assembled, and otherwise managed by a Spring IoC container.

翻译过来就是:

在 Spring 中,构成应用程序主干并由Spring IoC容器管理的对象称为bean。bean是一个由Spring IoC容器实例化、组装和管理的对象。

参考 What is a Spring Bean?
参考 spring bean是什么?


bean规范如下:

  • 所有属性为private
  • 提供getter和setter
  • 提供默认构造方法
  • 实现serializable接口

参考 Java bean 是个什么概念?

发表评论

表情:
评论列表 (有 0 条评论,187人围观)

还没有评论,来说两句吧...

相关阅读