더 읽 기
1、@controller ( )
2、@service ( dao)
3、@repository dao( dao )
4、@component ( pojo spring , )
@Component,@Service,@Controller,@Repository , spring 。
component
base-package ( )
1、@Service
2、@Controller ( struts action)
3、@Repository , DAO .
4、@Component , , 。
@Service public class UserServiceImpl implements UserService { }
@Repository public class UserDaoImpl implements UserDao { } getBean ( ), , @Service(“***”) , bean , , @Service(“beanName”)
@Scope(“prototype”) 。 ( ): @PostConstruct public void init() { }