Home > Back-end >  Springboot freemarker built-in object is empty
Springboot freemarker built-in object is empty

Time:12-08

Tools for IDEA
The configuration file
 freemarker: 
Request - the context - attribute: request
# prohibited stencil buffer
Cache: false
The template loader - path: the classpath:/templates
Suffix: HTML
Settings:
Classic_compatible: true

In the template calls the built-in objects
 
Request: ${Request (" method ")} & lt;/dt> The default built-in object is empty
Request: ${request. Id} & lt;/dt> Object bindings in the configuration file is empty


This is what problem, according to the method of online tried also not line

CodePudding user response:

See your configuration there have added classic_compatible=true
In your template built-in objects need to add: & lt; #if myOptionalVar??> The when - present<# else> when-missing

CodePudding user response:

Classic_compatible=true is no cache when development, and take less than the request object
  • Related