You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
org.springframework.expression.spel.SpelEvaluationException: EL1057E: No bean resolver registered in the context to resolve access to bean 'fileHandling'
This is how I prepare Themeleaf (I don't use a Model):
final Context ctx = new Context();
ctx.setVariable("files", map);
ctx.setVariable("fileHandling",fh);
String html = templateEngine.process("flattopic", ctx);
It doesn't make a difference if I setVariable( "fileHandling" ) or not.
The service is defined this way:
@Service
public class FileHandling {
public void doSomething() {
I know that I could make my service static and call it ${T(org.foo.bar.package.FileHandling).doSomething()} but this is much less concise and would force me change the service which I use in a lot of other places.
I asked a similar question on stack overflow and link to it from here.
The text was updated successfully, but these errors were encountered:
BUG
So far I think that what I discovered is a bug
When trying to access said bean I get :
In my template I have this piece of code:
<td th:text="${@fileHandling.doSomething()}">...</td>
This is how I prepare Themeleaf (I don't use a
Model
):It doesn't make a difference if I
setVariable( "fileHandling" )
or not.The service is defined this way:
I know that I could make my service static and call it
${T(org.foo.bar.package.FileHandling).doSomething()}
but this is much less concise and would force me change the service which I use in a lot of other places.I asked a similar question on stack overflow and link to it from here.
The text was updated successfully, but these errors were encountered: