Record Class AdkWebCorsProperties
java.lang.Object
java.lang.Record
com.google.adk.web.config.AdkWebCorsProperties
@ConfigurationProperties(prefix="adk.web.cors")
public record AdkWebCorsProperties(String mapping, List<String> origins, List<String> methods, List<String> headers, boolean allowCredentials, long maxAge)
extends Record
Properties for configuring CORS in ADK Web. This class is used to load CORS settings from
application properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowCredentialsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.headers()Returns the value of theheadersrecord component.mapping()Returns the value of themappingrecord component.longmaxAge()Returns the value of themaxAgerecord component.methods()Returns the value of themethodsrecord component.origins()Returns the value of theoriginsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AdkWebCorsProperties
public AdkWebCorsProperties(String mapping, List<String> origins, List<String> methods, List<String> headers, boolean allowCredentials, long maxAge) Creates an instance of aAdkWebCorsPropertiesrecord class.- Parameters:
mapping- the value for themappingrecord componentorigins- the value for theoriginsrecord componentmethods- the value for themethodsrecord componentheaders- the value for theheadersrecord componentallowCredentials- the value for theallowCredentialsrecord componentmaxAge- the value for themaxAgerecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
mapping
Returns the value of themappingrecord component.- Returns:
- the value of the
mappingrecord component
-
origins
-
methods
-
headers
-
allowCredentials
public boolean allowCredentials()Returns the value of theallowCredentialsrecord component.- Returns:
- the value of the
allowCredentialsrecord component
-
maxAge
public long maxAge()Returns the value of themaxAgerecord component.- Returns:
- the value of the
maxAgerecord component
-