…spring life cycle

it depends on what scope assigned to the bean :SINGLETON AND PROTOTYPE . AS well as the init type :lazy ,eager.

@Service用于标注业务层组件,

@Controller用于标注控制层组件(如struts中的action),

@Repository用于标注数据访问组件,即DAO组件,

@Component泛指组件,当组件不好归类的时候,我们可以使用这个注解进行标注。

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s