This repository was archived by the owner on Jan 8, 2026. It is now read-only.
Repository navigation
v1.10.4
1.10.4
- Update: DefaultGptHttpUtil Class Changed to Singleton Pattern
Old
DefaultGptHttpUtil util = new DefaultGptHttpUtil();
New
DefaultGptHttpUtil util = DefaultGptHttpUtil.getInstance();
Old
DefaultGptHttpUtil util = new DefaultGptHttpUtil(true, 20000, 50000);
New
DefaultGptHttpUtil util = DefaultGptHttpUtil.getInstance();
util.init(true, 20000, 50000);
Additional Notes
- This change ensures that
DefaultGptHttpUtilhas only one instance throughout the application lifecycle, thereby
reducing memory usage and potential thread safety issues. - The
initmethod provides flexibility to set the instance parameters, but it should be called before the first use of
theDefaultGptHttpUtilinstance.