spring标签(@value,@Service,@requestMapping,@repository),mybaitis各层的关系

1、@Value 这个标签可以把properties中的数据注入到变量中。 @Value("${mail_host}") private String host; 通过上述这个方法,mail_host就可以注入到host中。 2、@Service与@Transactional @Service主要用于标注业务层。(而且标注的是类) @Transactional表示需要有业务管理 @Service
相关文章
相关标签/搜索