micronaut-views icon indicating copy to clipboard operation
micronaut-views copied to clipboard

views-jte: when dynamic == true, but fails to find source files, loading templates from classpath fails

Open edward3h opened this issue 2 years ago • 2 comments

Expected Behavior

My jte files are in a separate submodule from my Micronaut application. Micronaut was configured with "micronaut.views.jte.dynamic: true"

Since the jte files are not in a location which matches the conventions JteViewsRenderer looks for, it should fall back to using the precompiled classes from the classpath.

Actual Behaviour

When I make a request, a log message says "Dynamic view path not found, using views from classpath.", however it is followed by "Unexpected error occurred: View [home] does not exist"

Steps To Reproduce

No response

Environment Information

No response

Example Application

No response

Version

3.8.6

edward3h avatar Apr 18 '23 12:04 edward3h

I wrote the JteViewRenderer, so I'm working on a fix myself. Just thought it would be good to report the bug in case the fix takes a while.

edward3h avatar Apr 18 '23 12:04 edward3h

Workaround - don't configure the dynamic setting when it doesn't work!

edward3h avatar Apr 18 '23 12:04 edward3h