Enabled GZip support (but don't use it as class annotation, otherwise constructor injection will fail)
This commit is contained in:
parent
2bd8fb6e06
commit
55f53e0dd5
|
@ -10,6 +10,7 @@ import org.eclipse.microprofile.openapi.annotations.media.Schema
|
|||
import org.eclipse.microprofile.openapi.annotations.parameters.RequestBody
|
||||
import org.eclipse.microprofile.openapi.annotations.responses.APIResponse
|
||||
import org.eclipse.microprofile.openapi.annotations.tags.Tag
|
||||
import org.jboss.resteasy.annotations.GZIP
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
|
@ -20,11 +21,16 @@ import javax.ws.rs.core.Response
|
|||
|
||||
@Path("/epcqrcode/v1")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@GZIP
|
||||
@Tag(name = "EPC QR Code")
|
||||
class EpcQrCodeResource(
|
||||
@Inject private val service: EpcQrCodeService,
|
||||
@Inject private val htmlService: HtmlService
|
||||
) {
|
||||
class EpcQrCodeResource {
|
||||
|
||||
// after adding GZip support compiler didn't like constructor injection anymore, so i switched to property injection
|
||||
@Inject
|
||||
private lateinit var service: EpcQrCodeService
|
||||
|
||||
@Inject
|
||||
internal lateinit var htmlService: HtmlService
|
||||
|
||||
private val log = LoggerFactory.getLogger(EpcQrCodeResource::class.java)
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@ quarkus.http.port=8080
|
|||
|
||||
quarkus.http.cors=true
|
||||
|
||||
quarkus.resteasy.gzip.enabled=true
|
||||
quarkus.resteasy.gzip.max-input=10M
|
||||
|
||||
|
||||
# disable this output:
|
||||
# Press [h] for more options>
|
||||
|
|
Loading…
Reference in New Issue