什么是 spring 中的元数据。什么是 Spring 的元数据编程。 Spring 的元数据如何支持向我们的源代码添加注释。
最佳答案
元数据是描述您的 spring bean 及其方法的数据。可以通过多种方式添加元数据:
- xml -
<bean>
- 注释(
@Service
、@Component
、@Lazy
、@Async
等) - javaconfig - 再次注释,但意味着允许更多的灵 active -
@Configuration
,@Bean
.
我不知道“元数据编程”是什么意思,但很可能是使用了上面的注解和xml。
关于java - 什么是 Spring 的元数据编程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9265493/