Quarkus Quit Kotlin index page is displaying io.quarkus.qute.runtime.TemplateProducer$InjectableTemplate$InjectableTemplateInstanceImp

39 views Asked by At

I am using latest version of Quarkus with Kotlin and Qute.

I am trying to run my index page and when I call the page in browser I am keep getting white page with the below message. Look like the page is not rendering or the html file is not identified in templates folder.

io.quarkus.qute.runtime.TemplateProducer$InjectableTemplate$InjectableTemplateInstanceImpl@581c8266

Gradle properties

 quarkusPlatformArtifactId=quarkus-bom
 quarkusPlatformGroupId=io.quarkus.platform
 quarkusPlatformVersion=3.7.4
 quarkusPluginId=io.quarkus

gradle build file dependency

dependencies {
implementation("io.quarkus:quarkus-qute")
implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))
implementation("io.quarkus:quarkus-resteasy-jsonb")
implementation("io.quarkus:quarkus-kotlin")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("io.quarkus:quarkus-arc")
implementation("io.quarkus:quarkus-resteasy-reactive-jackson")
testImplementation("io.quarkus:quarkus-junit5")
testImplementation("io.rest-assured:rest-assured")
testImplementation("io.rest-assured:kotlin-extensions")
 }

the code is

 import io.quarkus.qute.Location
 import io.quarkus.qute.Template
 import io.quarkus.qute.TemplateInstance
 import jakarta.inject.Inject
 import jakarta.ws.rs.GET
 import jakarta.ws.rs.Path
 import jakarta.ws.rs.Produces
 import jakarta.ws.rs.core.MediaType


 @Path("/")
 @Produces(MediaType.TEXT_HTML)
 class IndexEndpoint @Inject constructor(@Location("index/index.html") val index: Template) {

@GET
 fun index(): TemplateInstance {
   println("I am called.")
   return index.instance()
}

  }

I have a base.html in templates folder and file in index/index.html all have basic html content

Not sure what I am missing.

0

There are 0 answers