Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我在不同的线程中创建 2 个 WebClient,如何让它们使用相同的 cookie?
您可以使用以下代码:
CookieManager cookieManager = new CookieManager(); webClient1.setCookieManager(cookieManager); webClient2.setCookieManager(cookieManager);