When I put something in model in spring mvc like this:
@RequestMapping(method = RequestMethod.GET)
public String createForm(Model model) {
model.addAttribute("item", new Item());
return "item/new";
}
bean “item” is not resolved by IntelliJ in corresponding JSP pages. I mean, it works perfectly fine, but autocompletion doesn’t :/
Is there any way to have autocompletion in such case?
IntelliJ’s JSP support understands a special kind of comment annotation:
If you place this annotation at the top of your file, idea will provide auto completion for expressions starting with
${foo.based on the properties of classcom.yourcompany.YourClassIntelliJ will also offer to create this annotation if you hover over the
foopart of an expression.