ऐसा कुछ कैसा रहेगा:
@Component
public class MongoDBManager {
@Autowired
Mongo mongo;
@PreDestroy
public void shutdown() {
mongo.close();
}
}
ऐसा कुछ कैसा रहेगा:
@Component
public class MongoDBManager {
@Autowired
Mongo mongo;
@PreDestroy
public void shutdown() {
mongo.close();
}
}