package com.gds.stu.mongo; import org.bson.Document; import com.gds.MongoDB; import com.mongodb.client.FindIterable; public class MongoTest1 { private MongoDB mongo = new MongoDB(); private String mongoServer = "196.168.1.175"; public void select(){ try{ mongo.init(mongoServer, "shopfloor"); Document condition = new Document(); condition.put("TC002", "16010001"); FindIterable<Document> cursor = mongo.select("DS_PURTC", new Document[]{condition}); if(cursor != null){ for(Document doc : cursor){ double TC026 = doc.getDouble("TC026"); System.out.println(TC026 + "/n"); } } }catch(Exception e){ System.out.print(e); }finally{ mongo.finalize(); } } }
请问这里需要怎么改,编译通过,运行提示错误,找不到main方法
__innocence
Yexiaomo
相关分类