摘要: 首先我们看看这两个注解的作用: @Component注解表明一个类会作为组件类,并告知Spring要为这个类创建bean。 @Bean注解告诉Spring这个方法将会返回一个对象,这个对象要注册为Spring应用上下文中的bean。通常方法体中包含了最终产生bean实例的逻辑。 两者的目的是一样的, 阅读全文
posted @ 2021-03-26 16:25 JOKI丶 阅读(542) 评论(0) 推荐(0)
摘要: 创建(insert) 语法结构: db.collection.insert( <document or array of documents>, { writeConcern: <document>, ordered: <boolean> } ) document :插入集合中的文档。 writeC 阅读全文
posted @ 2021-03-26 10:19 JOKI丶 阅读(57) 评论(0) 推荐(0)