diff --git a/docs/src/main/asciidoc/qute.adoc b/docs/src/main/asciidoc/qute.adoc index a53ab455466ae..d788fe09006ff 100644 --- a/docs/src/main/asciidoc/qute.adoc +++ b/docs/src/main/asciidoc/qute.adoc @@ -66,7 +66,7 @@ public class HelloResource { } } ---- -<1> If there is no `@ResourcePath` qualifier provided, the field name is used to locate the template. In this particular case, we're injecting a template with path `templates/hello.txt`. +<1> If there is no `@Location` qualifier provided, the field name is used to locate the template. In this particular case, we're injecting a template with path `templates/hello.txt`. <2> `Template.data()` returns a new template instance that can be customized before the actual rendering is triggered. In this case, we put the name value under the key `name`. The data map is accessible during rendering. <3> Note that we don't trigger the rendering - this is done automatically by a special `ContainerResponseFilter` implementation. @@ -442,7 +442,7 @@ package org.acme.quarkus.sample; import javax.inject.Inject; import io.quarkus.qute.Template; -import io.quarkus.qute.api.ResourcePath; +import io.quarkus.qute.Location; import io.quarkus.scheduler.Scheduled; public class ReportGenerator { @@ -450,7 +450,7 @@ public class ReportGenerator { @Inject SampleService service; - @ResourcePath("reports/v1/report_01") <1> + @Location("reports/v1/report_01") <1> Template report; @Scheduled(cron="0 30 * * * ?") <2> @@ -463,7 +463,7 @@ public class ReportGenerator { } } ---- -<1> In this case, we use the `@ResourcePath` qualifier to specify the template path: `templates/reports/v1/report_01.html`. +<1> In this case, we use the `@Location` qualifier to specify the template path: `templates/reports/v1/report_01.html`. <2> Use the `@Scheduled` annotation to instruct Quarkus to execute this method on the half hour. For more information see the link:scheduler[Scheduler] guide. <3> The `TemplateInstance.render()` method triggers rendering. Note that this method blocks the current thread. diff --git a/extensions/mailer/deployment/src/main/java/io/quarkus/mailer/deployment/MailerProcessor.java b/extensions/mailer/deployment/src/main/java/io/quarkus/mailer/deployment/MailerProcessor.java index 7d27ace755dc9..991e2d75e0796 100644 --- a/extensions/mailer/deployment/src/main/java/io/quarkus/mailer/deployment/MailerProcessor.java +++ b/extensions/mailer/deployment/src/main/java/io/quarkus/mailer/deployment/MailerProcessor.java @@ -101,7 +101,7 @@ void validateMailTemplates( for (InjectionPointInfo injectionPoint : validationPhase.getContext().get(BuildExtension.Key.INJECTION_POINTS)) { if (injectionPoint.getRequiredType().name().equals(MAIL_TEMPLATE)) { - AnnotationInstance resourcePath = injectionPoint.getRequiredQualifier(QuteProcessor.RESOURCE_PATH); + AnnotationInstance resourcePath = injectionPoint.getRequiredQualifier(QuteProcessor.LOCATION); String name; if (resourcePath != null) { name = resourcePath.value().asString(); diff --git a/extensions/mailer/deployment/src/test/java/io/quarkus/mailer/InjectionTest.java b/extensions/mailer/deployment/src/test/java/io/quarkus/mailer/InjectionTest.java index edc358a8c3f52..089416dfcde56 100644 --- a/extensions/mailer/deployment/src/test/java/io/quarkus/mailer/InjectionTest.java +++ b/extensions/mailer/deployment/src/test/java/io/quarkus/mailer/InjectionTest.java @@ -14,8 +14,8 @@ import org.junit.jupiter.api.extension.RegisterExtension; import io.quarkus.mailer.MailTemplate.MailTemplateInstance; -import io.quarkus.qute.api.CheckedTemplate; -import io.quarkus.qute.api.ResourcePath; +import io.quarkus.qute.CheckedTemplate; +import io.quarkus.qute.Location; import io.quarkus.test.QuarkusUnitTest; import io.smallrye.mutiny.Uni; import io.vertx.ext.mail.MailClient; @@ -123,7 +123,7 @@ static class Templates { @Inject MailTemplate test1; - @ResourcePath("mails/test2") + @Location("mails/test2") MailTemplate testMail; Uni send1() { diff --git a/extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/MailTemplateProducer.java b/extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/MailTemplateProducer.java index 15b501dd55859..c8c5d2e9c3942 100644 --- a/extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/MailTemplateProducer.java +++ b/extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/MailTemplateProducer.java @@ -15,9 +15,10 @@ import io.quarkus.arc.Arc; import io.quarkus.mailer.MailTemplate; +import io.quarkus.qute.Location; import io.quarkus.qute.Template; import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.ResourcePath; +import io.quarkus.qute.runtime.LocationLiteral; @Singleton public class MailTemplateProducer { @@ -50,19 +51,19 @@ MailTemplate getDefault(InjectionPoint injectionPoint) { return new MailTemplate() { @Override public MailTemplateInstance instance() { - return new MailTemplateInstanceImpl(mailer, template.select(new ResourcePath.Literal(name)).get().instance()); + return new MailTemplateInstanceImpl(mailer, template.select(new LocationLiteral(name)).get().instance()); } }; } - @ResourcePath("ignored") + @Location("ignored") @Produces MailTemplate get(InjectionPoint injectionPoint) { - ResourcePath path = null; + Location path = null; for (Annotation qualifier : injectionPoint.getQualifiers()) { - if (qualifier.annotationType().equals(ResourcePath.class)) { - path = (ResourcePath) qualifier; + if (qualifier.annotationType().equals(Location.class)) { + path = (Location) qualifier; break; } } @@ -73,7 +74,7 @@ MailTemplate get(InjectionPoint injectionPoint) { return new MailTemplate() { @Override public MailTemplateInstance instance() { - return new MailTemplateInstanceImpl(mailer, template.select(new ResourcePath.Literal(name)).get().instance()); + return new MailTemplateInstanceImpl(mailer, template.select(new LocationLiteral(name)).get().instance()); } }; } diff --git a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/Names.java b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/Names.java index a7873e3160181..32a3f4923155f 100644 --- a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/Names.java +++ b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/Names.java @@ -12,8 +12,6 @@ import io.quarkus.qute.Location; import io.quarkus.qute.Template; import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.CheckedTemplate; -import io.quarkus.qute.api.ResourcePath; import io.quarkus.qute.i18n.Localized; import io.quarkus.qute.i18n.Message; import io.quarkus.qute.i18n.MessageBundle; @@ -26,7 +24,6 @@ final class Names { static final DotName MESSAGE = DotName.createSimple(Message.class.getName()); static final DotName MESSAGE_PARAM = DotName.createSimple(MessageParam.class.getName()); static final DotName LOCALIZED = DotName.createSimple(Localized.class.getName()); - static final DotName RESOURCE_PATH = DotName.createSimple(ResourcePath.class.getName()); static final DotName TEMPLATE = DotName.createSimple(Template.class.getName()); static final DotName ITERABLE = DotName.createSimple(Iterable.class.getName()); static final DotName ITERATOR = DotName.createSimple(Iterator.class.getName()); @@ -34,7 +31,6 @@ final class Names { static final DotName MAP = DotName.createSimple(Map.class.getName()); static final DotName MAP_ENTRY = DotName.createSimple(Entry.class.getName()); static final DotName COLLECTION = DotName.createSimple(Collection.class.getName()); - static final DotName CHECKED_TEMPLATE_OLD = DotName.createSimple(CheckedTemplate.class.getName()); static final DotName TEMPLATE_INSTANCE = DotName.createSimple(TemplateInstance.class.getName()); static final DotName COMPLETION_STAGE = DotName.createSimple(CompletionStage.class.getName()); static final DotName UNI = DotName.createSimple(Uni.class.getName()); diff --git a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/QuteProcessor.java b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/QuteProcessor.java index efea10956644d..1c83a483c451c 100644 --- a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/QuteProcessor.java +++ b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/QuteProcessor.java @@ -106,7 +106,6 @@ import io.quarkus.qute.UserTagSectionHelper; import io.quarkus.qute.Variant; import io.quarkus.qute.WhenSectionHelper; -import io.quarkus.qute.api.ResourcePath; import io.quarkus.qute.deployment.TemplatesAnalysisBuildItem.TemplateAnalysis; import io.quarkus.qute.deployment.TypeCheckExcludeBuildItem.TypeCheck; import io.quarkus.qute.deployment.TypeInfos.Info; @@ -136,7 +135,7 @@ public class QuteProcessor { - public static final DotName RESOURCE_PATH = Names.RESOURCE_PATH; + public static final DotName LOCATION = Names.LOCATION; private static final Logger LOGGER = Logger.getLogger(QuteProcessor.class); @@ -205,8 +204,8 @@ void processTemplateErrors(TemplatesAnalysisBuildItem analysis, List collectCheckedTemplates(BeanArchiveIndexBuildItem Map checkedTemplateMethods = new HashMap<>(); Set checkedTemplateAnnotations = new HashSet<>(); - checkedTemplateAnnotations.addAll(index.getIndex().getAnnotations(Names.CHECKED_TEMPLATE_OLD)); checkedTemplateAnnotations.addAll(index.getIndex().getAnnotations(Names.CHECKED_TEMPLATE)); // Build a set of file paths for validation @@ -1054,10 +1052,6 @@ void validateTemplateInjectionPoints(QuteConfig config, Listnative static methods will be used to declare - * templates and the list of parameters they require. - *

- * The name of a method and the base path are used to locate the template contents. - * By default, the base path is derived from the annotation target: - *

    - *
  • If this is placed on a static nested class of an enclosing class with a simple name X, a - * native static method of the name foo will refer to a template at the path X/foo - * (template file extensions are - * not part of the method name) relative to the templates root.
  • - *
  • If this is placed on a top-level class, a native static method of the name foo will refer to a - * template at the path foo (template file extensions are - * not part of the method name) at the toplevel of the templates root.
  • - *
- * The base path can be also specified via {@link #basePath()}. - *

- * Each parameter of the native static will be used to validate the template at build time, to - * make sure that those parameters are used properly in a type-safe manner. The return type of each - * native static method should be {@link TemplateInstance}. - *

- * Example: - *

- * - *

- * @Path("item")
- * public class ItemResource {
- * 
- *     @CheckedTemplate
- *     static class Templates {
- *         // defines a template at ItemResource/item, taking an Item parameter named item
- *         static native TemplateInstance item(Item item);
- *     }
- * 
- *     @GET
- *     @Path("{id}")
- *     @Produces(MediaType.TEXT_HTML)
- *     public TemplateInstance get(@PathParam("id") Integer id) {
- *         // instantiate that template and pass it the required template parameter
- *         return Templates.item(service.findItem(id));
- *     }
- * }
- * 
- * - * @deprecated Use {@link io.quarkus.qute.CheckedTemplate} instead. This annotation will be removed at some point post Quarkus - * 1.13. - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -@Deprecated -public @interface CheckedTemplate { - - /** - * Constant value for {@link #basePath()} indicating that the default strategy should be used. - */ - String DEFAULTED = "<>"; - - /** - * Example: - * - *
-     * @Path("item")
-     * public class ItemResource {
-     * 
-     *     @CheckedTemplate(basePath = "items_v1")
-     *     static class Templates {
-     *         // defines a template at items_v1/item
-     *         static native TemplateInstance item(Item item);
-     * 
-     *         // defines a template at items_v1/allItems
-     *         static native TemplateInstance allItems(List<Item> items);
-     *     }
-     * }
-     * 
- * - * @return the base path relative to the templates root - */ - String basePath() default DEFAULTED; - -} diff --git a/extensions/qute/runtime/src/main/java/io/quarkus/qute/api/ResourcePath.java b/extensions/qute/runtime/src/main/java/io/quarkus/qute/api/ResourcePath.java deleted file mode 100644 index 939597999a1c0..0000000000000 --- a/extensions/qute/runtime/src/main/java/io/quarkus/qute/api/ResourcePath.java +++ /dev/null @@ -1,53 +0,0 @@ -package io.quarkus.qute.api; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import javax.enterprise.util.AnnotationLiteral; -import javax.enterprise.util.Nonbinding; -import javax.inject.Qualifier; - -/** - * Qualifies an injected template. The {@link #value()} is used to locate the template; it represents the path relative from - * the base path. - * - * @deprecated Use {@link io.quarkus.qute.Location} instead. This annotation will be removed at some point post Quarkus 1.13. - */ -@Qualifier -@Retention(RUNTIME) -@Target({ FIELD, PARAMETER, METHOD }) -@Deprecated -public @interface ResourcePath { - - /** - * @return the path relative from the base path, must not be an empty string - */ - @Nonbinding - String value(); - - /** - * Supports inline instantiation of this qualifier. - */ - public static final class Literal extends AnnotationLiteral implements ResourcePath { - - private static final long serialVersionUID = 1L; - - private final String value; - - public Literal(String value) { - this.value = value; - } - - @Override - public String value() { - return value; - } - - } - -} \ No newline at end of file diff --git a/extensions/qute/runtime/src/main/java/io/quarkus/qute/runtime/TemplateProducer.java b/extensions/qute/runtime/src/main/java/io/quarkus/qute/runtime/TemplateProducer.java index 9f5753446e075..13ff6303af8ca 100644 --- a/extensions/qute/runtime/src/main/java/io/quarkus/qute/runtime/TemplateProducer.java +++ b/extensions/qute/runtime/src/main/java/io/quarkus/qute/runtime/TemplateProducer.java @@ -27,7 +27,6 @@ import io.quarkus.qute.TemplateInstance; import io.quarkus.qute.TemplateInstanceBase; import io.quarkus.qute.Variant; -import io.quarkus.qute.api.ResourcePath; import io.quarkus.qute.runtime.QuteRecorder.QuteContext; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; @@ -73,16 +72,12 @@ Template getDefaultTemplate(InjectionPoint injectionPoint) { @Produces @Location("ignored") - @ResourcePath("ignored") Template getTemplate(InjectionPoint injectionPoint) { String path = null; for (Annotation qualifier : injectionPoint.getQualifiers()) { if (qualifier.annotationType().equals(Location.class)) { path = ((Location) qualifier).value(); break; - } else if (qualifier.annotationType().equals(ResourcePath.class)) { - path = ((ResourcePath) qualifier).value(); - break; } } if (path == null || path.isEmpty()) { diff --git a/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/HelloResource.java b/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/HelloResource.java index 33c8cea643470..7c059551dd047 100644 --- a/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/HelloResource.java +++ b/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/HelloResource.java @@ -8,9 +8,9 @@ import org.jboss.resteasy.annotations.jaxrs.QueryParam; +import io.quarkus.qute.CheckedTemplate; import io.quarkus.qute.Template; import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.CheckedTemplate; import io.quarkus.resteasy.qute.RestTemplate; @Path("hello") diff --git a/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/ItemResource.java b/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/ItemResource.java index 4b7937c62f096..4842d2a3ddbc6 100644 --- a/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/ItemResource.java +++ b/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/ItemResource.java @@ -6,8 +6,8 @@ import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import io.quarkus.qute.CheckedTemplate; import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.CheckedTemplate; @Path("item") public class ItemResource { diff --git a/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/MissingTemplateResource.java b/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/MissingTemplateResource.java index b20f034f1b2ea..4fc06ee5312c1 100644 --- a/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/MissingTemplateResource.java +++ b/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/MissingTemplateResource.java @@ -4,8 +4,8 @@ import javax.ws.rs.Path; +import io.quarkus.qute.CheckedTemplate; import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.CheckedTemplate; @Path("missing-template") public class MissingTemplateResource { diff --git a/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/Templates.java b/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/Templates.java index 31bfedf82c895..cf50e95506064 100644 --- a/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/Templates.java +++ b/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/Templates.java @@ -1,7 +1,7 @@ package io.quarkus.qute.resteasy.deployment; +import io.quarkus.qute.CheckedTemplate; import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.CheckedTemplate; @CheckedTemplate public class Templates { diff --git a/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/TypeErrorResource.java b/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/TypeErrorResource.java index a8bc79aca65be..a0b859d9822ba 100644 --- a/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/TypeErrorResource.java +++ b/extensions/resteasy-classic/resteasy-qute/deployment/src/test/java/io/quarkus/qute/resteasy/deployment/TypeErrorResource.java @@ -3,8 +3,8 @@ import javax.ws.rs.GET; import javax.ws.rs.Path; +import io.quarkus.qute.CheckedTemplate; import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.CheckedTemplate; @Path("type-error") public class TypeErrorResource { diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/HelloResource.java b/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/HelloResource.java index c5bef35231aec..220ad8ddc1872 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/HelloResource.java +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/HelloResource.java @@ -7,9 +7,9 @@ import javax.ws.rs.Path; import javax.ws.rs.QueryParam; +import io.quarkus.qute.CheckedTemplate; import io.quarkus.qute.Template; import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.CheckedTemplate; import io.quarkus.resteasy.reactive.qute.RestTemplate; @Path("hello") diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/MissingTemplateResource.java b/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/MissingTemplateResource.java index a26599371e6b1..42f9b22832f83 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/MissingTemplateResource.java +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/MissingTemplateResource.java @@ -4,8 +4,8 @@ import javax.ws.rs.Path; +import io.quarkus.qute.CheckedTemplate; import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.CheckedTemplate; @Path("missing-template") public class MissingTemplateResource { diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/Templates.java b/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/Templates.java index 30bf36437f345..41b8560af633e 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/Templates.java +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/Templates.java @@ -1,7 +1,7 @@ package io.quarkus.resteasy.reactive.qute.deployment; +import io.quarkus.qute.CheckedTemplate; import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.CheckedTemplate; @CheckedTemplate public class Templates { diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/TypeErrorResource.java b/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/TypeErrorResource.java index 981d22b64e2a4..05753de0cc286 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/TypeErrorResource.java +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/deployment/src/test/java/io/quarkus/resteasy/reactive/qute/deployment/TypeErrorResource.java @@ -3,8 +3,8 @@ import javax.ws.rs.GET; import javax.ws.rs.Path; +import io.quarkus.qute.CheckedTemplate; import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.CheckedTemplate; @Path("type-error") public class TypeErrorResource { diff --git a/integration-tests/qute/src/main/java/io/quarkus/it/qute/NotFoundExceptionMapper.java b/integration-tests/qute/src/main/java/io/quarkus/it/qute/NotFoundExceptionMapper.java index a1ada8a2ab5ca..6e0810e98fbc8 100644 --- a/integration-tests/qute/src/main/java/io/quarkus/it/qute/NotFoundExceptionMapper.java +++ b/integration-tests/qute/src/main/java/io/quarkus/it/qute/NotFoundExceptionMapper.java @@ -8,13 +8,14 @@ import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; +import io.quarkus.qute.Location; import io.quarkus.qute.Template; import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.ResourcePath; @Provider public class NotFoundExceptionMapper implements ExceptionMapper { - @ResourcePath("not-found.html") + + @Location("not-found.html") Template notFoundTemplate; @Override