Skip to content

Commit 81ba589

Browse files
committed
Add Support for Spring Native 0.11. Fixes #1376
1 parent 6c86b61 commit 81ba589

File tree

2 files changed

+23
-19
lines changed

2 files changed

+23
-19
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<jaxb-impl.version>2.1</jaxb-impl.version>
7878
<javax.jws-api.version>1.1</javax.jws-api.version>
7979
<jjwt.version>0.9.1</jjwt.version>
80-
<spring-native.version>0.11.0-RC1</spring-native.version>
80+
<spring-native.version>0.11.0</spring-native.version>
8181
<therapi-runtime-javadoc.version>0.12.0</therapi-runtime-javadoc.version>
8282
</properties>
8383

springdoc-openapi-native/src/main/java/org/springdoc/nativex/core/SpringDocHints.java

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@
110110
import org.springframework.context.annotation.Configuration;
111111
import org.springframework.context.annotation.Lazy;
112112
import org.springframework.context.annotation.PropertySource;
113-
import org.springframework.nativex.hint.AccessBits;
114113
import org.springframework.nativex.hint.JdkProxyHint;
115114
import org.springframework.nativex.hint.ResourceHint;
115+
import org.springframework.nativex.hint.TypeAccess;
116116
import org.springframework.nativex.hint.TypeHint;
117117

118118
import static org.springdoc.core.Constants.SPRINGDOC_ENABLED;
119119

120120
@JdkProxyHint(typeNames = "javax.servlet.http.HttpServletRequest")
121-
@JdkProxyHint(typeNames = "org.springframework.web.context.request.NativeWebRequest" )
121+
@JdkProxyHint(typeNames = "org.springframework.web.context.request.NativeWebRequest")
122122

123123
@JdkProxyHint(typeNames = { "org.springframework.web.bind.annotation.RestController", "org.springframework.core.annotation.SynthesizedAnnotation" })
124124
@JdkProxyHint(typeNames = { "org.springframework.stereotype.Controller", "org.springframework.core.annotation.SynthesizedAnnotation" })
@@ -135,28 +135,31 @@
135135
@JdkProxyHint(typeNames = { "org.springframework.web.bind.annotation.PatchMapping", "org.springframework.core.annotation.SynthesizedAnnotation" })
136136
@JdkProxyHint(typeNames = { "org.springframework.web.bind.annotation.DeleteMapping", "org.springframework.core.annotation.SynthesizedAnnotation" })
137137
@JdkProxyHint(typeNames = { "org.springframework.web.bind.annotation.ControllerAdvice", "org.springframework.core.annotation.SynthesizedAnnotation" })
138-
@JdkProxyHint(typeNames = {"org.springframework.web.bind.annotation.RequestParam", "org.springframework.core.annotation.SynthesizedAnnotation"})
139-
@JdkProxyHint(typeNames = {"org.springframework.web.bind.annotation.RequestHeader", "org.springframework.core.annotation.SynthesizedAnnotation"})
140-
@JdkProxyHint(typeNames = {"org.springframework.web.bind.annotation.RequestBody", "org.springframework.core.annotation.SynthesizedAnnotation"})
141-
@JdkProxyHint(typeNames = {"org.springframework.web.bind.annotation.PathVariable", "org.springframework.core.annotation.SynthesizedAnnotation"})
142-
@JdkProxyHint(typeNames = {"org.springframework.web.bind.annotation.ModelAttribute", "org.springframework.core.annotation.SynthesizedAnnotation"})
143-
@JdkProxyHint(typeNames = {"org.springframework.stereotype.Controller", "org.springframework.core.annotation.SynthesizedAnnotation"})
144-
@JdkProxyHint(typeNames = {"org.springframework.web.bind.annotation.ControllerAdvice", "org.springframework.core.annotation.SynthesizedAnnotation"})
138+
@JdkProxyHint(typeNames = { "org.springframework.web.bind.annotation.RequestParam", "org.springframework.core.annotation.SynthesizedAnnotation" })
139+
@JdkProxyHint(typeNames = { "org.springframework.web.bind.annotation.RequestHeader", "org.springframework.core.annotation.SynthesizedAnnotation" })
140+
@JdkProxyHint(typeNames = { "org.springframework.web.bind.annotation.RequestBody", "org.springframework.core.annotation.SynthesizedAnnotation" })
141+
@JdkProxyHint(typeNames = { "org.springframework.web.bind.annotation.PathVariable", "org.springframework.core.annotation.SynthesizedAnnotation" })
142+
@JdkProxyHint(typeNames = { "org.springframework.web.bind.annotation.ModelAttribute", "org.springframework.core.annotation.SynthesizedAnnotation" })
143+
@JdkProxyHint(typeNames = { "org.springframework.stereotype.Controller", "org.springframework.core.annotation.SynthesizedAnnotation" })
144+
@JdkProxyHint(typeNames = { "org.springframework.web.bind.annotation.ControllerAdvice", "org.springframework.core.annotation.SynthesizedAnnotation" })
145145

146146
@TypeHint(typeNames = { "org.springdoc.core.CacheOrGroupedOpenApiCondition$OnCacheDisabled", "io.swagger.v3.oas.models.parameters.Parameter$StyleEnum",
147-
"io.swagger.v3.oas.models.security.SecurityScheme$In" , "io.swagger.v3.oas.models.security.SecurityScheme$Type",
148-
"org.springdoc.core.CacheOrGroupedOpenApiCondition$OnMultipleOpenApiSupportCondition", "org.springdoc.core.SpringDocConfigProperties$GroupConfig" ,
149-
"org.springdoc.core.SpringDocConfigProperties$Cache" , "org.springdoc.core.SpringDocConfigProperties$GroupConfig" ,
150-
"org.springdoc.core.AbstractSwaggerUiConfigProperties$SwaggerUrl" ,"org.springdoc.core.AbstractSwaggerUiConfigProperties$Direction" ,
151-
"org.springdoc.core.AbstractSwaggerUiConfigProperties$SyntaxHighlight" , "org.springdoc.core.SpringDocConfiguration$1",
147+
"io.swagger.v3.oas.models.security.SecurityScheme$In", "io.swagger.v3.oas.models.security.SecurityScheme$Type",
148+
"org.springdoc.core.CacheOrGroupedOpenApiCondition$OnMultipleOpenApiSupportCondition", "org.springdoc.core.SpringDocConfigProperties$GroupConfig",
149+
"org.springdoc.core.SpringDocConfigProperties$Cache", "org.springdoc.core.SpringDocConfigProperties$GroupConfig",
150+
"org.springdoc.core.AbstractSwaggerUiConfigProperties$SwaggerUrl", "org.springdoc.core.AbstractSwaggerUiConfigProperties$Direction",
151+
"org.springdoc.core.AbstractSwaggerUiConfigProperties$SyntaxHighlight", "org.springdoc.core.SpringDocConfiguration$1",
152152
"org.springdoc.core.SpringDocConfiguration$OpenApiResourceAdvice", "org.springdoc.core.SpringDocConfiguration$WebConversionServiceConfiguration",
153-
"org.springdoc.core.SpringDocConfigProperties$Webjars" , "org.springdoc.core.SpringDocConfigProperties$ApiDocs" }, access = AccessBits.ALL)
153+
"org.springdoc.core.SpringDocConfigProperties$Webjars", "org.springdoc.core.SpringDocConfigProperties$ApiDocs" },
154+
access = { TypeAccess.RESOURCE, TypeAccess.PUBLIC_CLASSES, TypeAccess.DECLARED_CLASSES, TypeAccess.DECLARED_CONSTRUCTORS, TypeAccess.PUBLIC_CONSTRUCTORS, TypeAccess.DECLARED_METHODS, TypeAccess.PUBLIC_METHODS
155+
, TypeAccess.PUBLIC_FIELDS, TypeAccess.DECLARED_FIELDS })
154156

155-
@TypeHint(types = { Constants.class, ModelConverter.class , ModelConverters.class}, access = AccessBits.ALL)
157+
@TypeHint(types = { Constants.class, ModelConverter.class, ModelConverters.class }, access = { TypeAccess.RESOURCE, TypeAccess.PUBLIC_CLASSES, TypeAccess.DECLARED_CLASSES, TypeAccess.DECLARED_CONSTRUCTORS, TypeAccess.PUBLIC_CONSTRUCTORS, TypeAccess.DECLARED_METHODS, TypeAccess.PUBLIC_METHODS
158+
, TypeAccess.PUBLIC_FIELDS, TypeAccess.DECLARED_FIELDS })
156159
@TypeHint(types = { SecurityRequirements.class, SecurityRequirement.class, ApiResponses.class, Callbacks.class, PropertySource.class, ExternalDocumentation.class, Hidden.class,
157160
Operation.class, Parameter.class, Callbacks.class, Extension.class, ExtensionProperty.class, Header.class, Link.class, LinkParameter.class,
158161
ArraySchema.class, Content.class, DiscriminatorMapping.class, Encoding.class, ExampleObject.class, Schema.class, RequestBody.class, ApiResponse.class,
159-
Info.class, Server.class, ServerVariable.class, OpenAPIDefinition.class, Tag.class, SecuritySchemes.class, SecurityScheme.class, SecuritySchemeType.class,
162+
Info.class, Server.class, ServerVariable.class, OpenAPIDefinition.class, Tag.class, SecuritySchemes.class, SecurityScheme.class, SecuritySchemeType.class,
160163
OAuthFlow.class, OAuthFlows.class, OAuthScope.class, License.class, Contact.class })
161164

162165
@TypeHint(types = {
@@ -252,7 +255,8 @@
252255
io.swagger.v3.oas.models.parameters.Parameter.class,
253256
io.swagger.v3.oas.models.Operation.class,
254257
io.swagger.v3.oas.models.headers.Header.class
255-
}, access = AccessBits.ALL )
258+
}, access = { TypeAccess.RESOURCE, TypeAccess.PUBLIC_CLASSES, TypeAccess.DECLARED_CLASSES, TypeAccess.DECLARED_CONSTRUCTORS, TypeAccess.PUBLIC_CONSTRUCTORS, TypeAccess.DECLARED_METHODS, TypeAccess.PUBLIC_METHODS
259+
, TypeAccess.PUBLIC_FIELDS, TypeAccess.DECLARED_FIELDS })
256260

257261
@ResourceHint(patterns = "sun.util.resources.LocaleNames", isBundle = true)
258262

0 commit comments

Comments
 (0)