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 TypeMethodDescriptionboolean
Returns the value of theallowCredentials
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.headers()
Returns the value of theheaders
record component.mapping()
Returns the value of themapping
record component.long
maxAge()
Returns the value of themaxAge
record component.methods()
Returns the value of themethods
record component.origins()
Returns the value of theorigins
record component.final String
toString()
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 aAdkWebCorsProperties
record class.- Parameters:
mapping
- the value for themapping
record componentorigins
- the value for theorigins
record componentmethods
- the value for themethods
record componentheaders
- the value for theheaders
record componentallowCredentials
- the value for theallowCredentials
record componentmaxAge
- the value for themaxAge
record 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 thecompare
method from their corresponding wrapper classes. -
mapping
Returns the value of themapping
record component.- Returns:
- the value of the
mapping
record component
-
origins
-
methods
-
headers
-
allowCredentials
public boolean allowCredentials()Returns the value of theallowCredentials
record component.- Returns:
- the value of the
allowCredentials
record component
-
maxAge
public long maxAge()Returns the value of themaxAge
record component.- Returns:
- the value of the
maxAge
record component
-