Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moving private JacksonObjectMapper into companion object to establish compatibility with CGLIB proxying #694

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -35,8 +35,6 @@ import org.springframework.web.bind.annotation.RestController
@RestController
open class DgsRestSchemaJsonController(open val schemaProvider: DgsSchemaProvider) {

private val mapper = jacksonObjectMapper()

// The @ConfigurationProperties bean name is <prefix>-<fqn>
@RequestMapping("#{@'dgs.graphql-com.netflix.graphql.dgs.webmvc.autoconfigure.DgsWebMvcConfigurationProperties'.schemaJson.path}", produces = ["application/json"])
fun schema(): String {
Expand All @@ -49,4 +47,8 @@ open class DgsRestSchemaJsonController(open val schemaProvider: DgsSchemaProvide

return mapper.writeValueAsString(execute.toSpecification())
}

companion object {
private val mapper = jacksonObjectMapper()
}
}
Expand Up @@ -43,7 +43,6 @@ import java.util.*
*/
@RestController
open class DgsSSESubscriptionHandler(open val dgsQueryExecutor: DgsQueryExecutor) {
private val mapper = jacksonObjectMapper()

@RequestMapping("/subscriptions", produces = ["text/event-stream"])
fun subscriptionWithId(@RequestParam("query") queryBase64: String): ResponseEntity<SseEmitter> {
Expand Down Expand Up @@ -152,6 +151,7 @@ open class DgsSSESubscriptionHandler(open val dgsQueryExecutor: DgsQueryExecutor
)

companion object {
private val mapper = jacksonObjectMapper()
private val logger: Logger = LoggerFactory.getLogger(DgsSSESubscriptionHandler::class.java)
}
}