Skip to content

Commit

Permalink
[Kotlin Server] Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Stexxe committed Dec 4, 2024
1 parent aa45441 commit 8779e1d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ public static class Constants {
public static final String USE_MUTINY_DESC = "Whether to use Mutiny (should not be used with useCoroutines). This option is currently supported only when using jaxrs-spec library.";
public static final String OMIT_GRADLE_WRAPPER = "omitGradleWrapper";
public static final String OMIT_GRADLE_WRAPPER_DESC = "Whether to omit Gradle wrapper for creating a sub project.";
public static final String KOTLIN_SERIALIZATION = "kotlinSerialization";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ import java.util.concurrent.TimeUnit
{{/featureMetrics}}
import io.ktor.server.routing.*
{{#hasAuthMethods}}
{{#kotlinSerialization}}
import io.ktor.serialization.kotlinx.json.json
{{/kotlinSerialization}}
import com.typesafe.config.ConfigFactory
import io.ktor.client.HttpClient
import io.ktor.client.engine.apache.Apache
Expand All @@ -56,9 +54,7 @@ fun Application.main() {
{{/featureMetrics}}
{{#generateApis}}
install(ContentNegotiation) {
{{#kotlinSerialization}}
json()
{{/kotlinSerialization}}
}
{{#featureAutoHead}}
install(AutoHeadResponse) // see https://ktor.io/docs/autoheadresponse.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import com.codahale.metrics.Slf4jReporter
import io.ktor.server.metrics.dropwizard.*
import java.util.concurrent.TimeUnit
import io.ktor.server.routing.*
import io.ktor.serialization.kotlinx.json.json
import com.typesafe.config.ConfigFactory
import io.ktor.client.HttpClient
import io.ktor.client.engine.apache.Apache
Expand All @@ -34,6 +35,7 @@ fun Application.main() {
reporter.start(10, TimeUnit.SECONDS)
}
install(ContentNegotiation) {
json()
}
install(AutoHeadResponse) // see https://ktor.io/docs/autoheadresponse.html
install(Compression, ApplicationCompressionConfiguration()) // see https://ktor.io/docs/compression.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import com.codahale.metrics.Slf4jReporter
import io.ktor.server.metrics.dropwizard.*
import java.util.concurrent.TimeUnit
import io.ktor.server.routing.*
import io.ktor.serialization.kotlinx.json.json
import com.typesafe.config.ConfigFactory
import io.ktor.client.HttpClient
import io.ktor.client.engine.apache.Apache
Expand All @@ -34,6 +35,7 @@ fun Application.main() {
reporter.start(10, TimeUnit.SECONDS)
}
install(ContentNegotiation) {
json()
}
install(AutoHeadResponse) // see https://ktor.io/docs/autoheadresponse.html
install(Compression, ApplicationCompressionConfiguration()) // see https://ktor.io/docs/compression.html
Expand Down

0 comments on commit 8779e1d

Please sign in to comment.