Skip to content

Commit

Permalink
[DO NOT MERGE] Qute: dev mode - debug a problem with no-restart-template
Browse files Browse the repository at this point in the history
  • Loading branch information
mkouba committed Nov 20, 2023
1 parent 3326e64 commit bf18915
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import java.util.UUID;

import jakarta.annotation.PostConstruct;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;

import io.quarkus.qute.Location;
import io.quarkus.qute.Template;
import io.quarkus.vertx.web.Route;
import io.vertx.ext.web.RoutingContext;
Expand All @@ -15,7 +15,7 @@ public class NoRestartRoute {

private String id;

@Inject
@Location("foo/norestart")
Template norestart;

@Route(path = "norestart")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public class NoRestartTemplatesDevModeTest {
.addClass(NoRestartRoute.class)
.addAsResource(new StringAsset(
"Hello {foo}!"),
"templates/norestart.html")
"templates/foo/norestart.html")
.addAsResource(new StringAsset(
"quarkus.qute.dev-mode.no-restart-templates=templates/norestart.html"),
"quarkus.qute.dev-mode.no-restart-templates=templates/foo/norestart.html"),
"application.properties"));

@Test
Expand All @@ -32,7 +32,7 @@ public void testNoRestartTemplates() {
String val = resp.getBody().asString();
assertTrue(val.startsWith("Hello "));

config.modifyResourceFile("templates/norestart.html", t -> t.concat("!!"));
config.modifyResourceFile("templates/foo/norestart.html", t -> t.concat("!!"));

resp = given().get("norestart");
resp.then().statusCode(200);
Expand Down

0 comments on commit bf18915

Please sign in to comment.