接口的使用
org.springframework.boot.web.servlet.server.CookieSameSiteSupplier
使用CookieSameSiteSupplier的程序包
-
org.springframework.boot.web.servlet.server中CookieSameSiteSupplier的使用
修饰符和类型方法说明static CookieSameSiteSupplierCookieSameSiteSupplier.of(Cookie.SameSite sameSite) Return a newCookieSameSiteSupplierthat always returns the givenCookie.SameSitevalue.static CookieSameSiteSupplierCookieSameSiteSupplier.ofLax()Return a newCookieSameSiteSupplierthat always returnsCookie.SameSite.LAX.static CookieSameSiteSupplierCookieSameSiteSupplier.ofNone()Return a newCookieSameSiteSupplierthat always returnsCookie.SameSite.NONE.static CookieSameSiteSupplierCookieSameSiteSupplier.ofStrict()Return a newCookieSameSiteSupplierthat always returnsCookie.SameSite.STRICT.default CookieSameSiteSupplierLimit this supplier so that it's only called if the predicate accepts the Cookie.default CookieSameSiteSupplierCookieSameSiteSupplier.whenHasName(String name) Limit this supplier so that it's only called if the Cookie has the given name.default CookieSameSiteSupplierCookieSameSiteSupplier.whenHasName(Supplier<String> nameSupplier) Limit this supplier so that it's only called if the Cookie has the given name.default CookieSameSiteSupplierCookieSameSiteSupplier.whenHasNameMatching(String regex) Limit this supplier so that it's only called if the Cookie name matches the given regex.default CookieSameSiteSupplierCookieSameSiteSupplier.whenHasNameMatching(Pattern pattern) Limit this supplier so that it's only called if the Cookie name matches the givenPattern.修饰符和类型方法说明voidAbstractServletWebServerFactory.addCookieSameSiteSuppliers(CookieSameSiteSupplier... cookieSameSiteSuppliers) voidConfigurableServletWebServerFactory.addCookieSameSiteSuppliers(CookieSameSiteSupplier... cookieSameSiteSuppliers) AddCookieSameSiteSuppliersto those that should be used to obtain theCookie.SameSiteattribute of any added cookie.修饰符和类型方法说明voidAbstractServletWebServerFactory.setCookieSameSiteSuppliers(List<? extends CookieSameSiteSupplier> cookieSameSiteSuppliers) voidConfigurableServletWebServerFactory.setCookieSameSiteSuppliers(List<? extends CookieSameSiteSupplier> cookieSameSiteSuppliers) SetsCookieSameSiteSuppliersthat should be used to obtain theCookie.SameSiteattribute of any added cookie.