Error during execution of processor 'org.thymeleaf.spring5.processor.SpringInputGeneralFieldTagProcessor'

后端 未结 3 1623
青春惊慌失措
青春惊慌失措 2021-01-24 00:15

I am trying to build simple search tab with thymeleaf and Spring boot. Here is my codes and html files.

scCountry.html

  
相关标签:
3条回答
  • 2021-01-24 00:47

    Was facing a similar problem. This didn't work:

    <input type="text" th:field="*{content}">

    This did:

    <input type="text" field="*{content}" name="content">

    0 讨论(0)
  • 2021-01-24 00:49
    th:field="*{sInput.keyWord}"
    

    should be

    th:field="*{keyWord}"
    

    When using *{...} expressions, the th:object is assumed.

    0 讨论(0)
  • 2021-01-24 00:57

    Do the below modifications in your controller and try

    @GetMapping(value="/search")
    
    public ModelAndView SearchForm(Model model, SearchInput sInput) {
    
        return new ModelAndView("scCountry");
    
    }
    

    Hope you will get solved your error.

    0 讨论(0)
提交回复
热议问题