【Java常见问题】基础知识(七)内存管理(垃圾回收机制)

Mongodb ORM工具, 支持面向对象操作Mongodb,可以和其它关系型DB同用一套Dao代码,还支持分片.

NoSQL ORM,支持Mongodb, Cassandra.

Hibernate/MyBatis+ plus +Sharding JDBC + Jpa+ Spring data+ GraphQL+ App ORM (Android, 鸿蒙)= Bee
要整合一堆的工具,还不如只用一个小巧又功能强大的工具。犹如 JAVA 界的数据源连接池 Hikari, 文件虽小,功能却不赖!

ORM Bee Sharding 分库分表就是那么简单,对开发透明,不影响业务,简单易用,文件小,性能好支持 Mongodb支持 JDBC,还支持 Android 和 Harmony;可以同时使用多种不同类型的数据库

Bee,互联网新时代的 Java ORM 工具,更快、更简单、更自动,开发速度快,运行快,更智能

Spring Boot 是用来简化新 Spring 应用的初始搭建以及开发过程。该框架使用了特定的方式来进行配置,
从而使开发人员不再需要定义样板化的配置。通过这种方式,Spring Boot 可以帮助我们进行快速应用开发

最新功能介绍:

V2.1.4.5(2023·荣耀)

23)支持Mongodb地理信息插入、查询,包括分片
24)支持Mongodb创建索引
25)支持Mongodb事务

Bee V2.1.x 往期发布:

https://www.oschina.net/news/226875/bee-2-1-2-1-released

https://www.oschina.net/news/230490/bee-2-1-2-28-released

https://www.oschina.net/news/231902/javaorm-bee-2-1-3-6

https://www.oschina.net/news/232911/bee-spring-boot-2-1-3-released

Mongodb ORM(Bee)详细功能列表

代码实例

Mongodb 事务(Mongodb 4.4+, 最好用5.0+):

	public static void main(String[] args) {
		Transaction tran=new MongodbTransaction();
		try {
			tran.begin();
			SuidRich suidRich=BF.getSuidRichForMongodb();
			Customer customer=new Customer();
			customer.setFirstName("Test36");
			int aa=suidRich.insert(customer); 
			System.out.println(aa);
			int ii=1/0; //报异常,插入操作会回滚
			List<Customer> list=suidRich.select(new Customer());
			tran.commit();
			Printer.printList(list);
		} catch (RuntimeException e) {
			tran.rollback();
			e.printStackTrace();
		} 
		System.err.println("finished!");
	}

地理信息查询:


public class Places implements Serializable {

	private static final long serialVersionUID = 1596145310658L;

	@GenUUID
	private String id;
	private String name;
	@Geo2dsphere
	private Location location;
	private String category;

...//getter,setter

}



        Condition condition3=BF.getCondition();
		condition3.op("name", Op.likeLeft, "Park2"); //左匹配
		NearPara nearPara=new NearPara("location", -73.9667, 40.78, 5000D, 1000D);
		List<Places> list3=suidRichExt.near(places, nearPara,condition3);
		Printer.printList(list3);

下期功能预告:

Mongodb原生sql也能直接执行了!

你还想添加什么功能,请到评论区告诉我们!

 

码云上的项目首页:

https://gitee.com/automvc/bee

https://gitee.com/automvc/bee-springboot

https://gitee.com/automvc/bee-springboot

 

猜你喜欢

转载自juejin.im/post/7218110901551562810