本文中提到的解決方案,源碼地址在:springboot-thymeleaf,但願能夠幫你解決問題。html
本文中涉及的兩個異常爲我開發時遇到的,可能和你目前所要處理的bug不一樣,若是不是同一個問題,但願再找找其餘文章。git
Exception evaluating SpringEL expression
這個異常的出現應該有不少緣由引發,本文中涉及的兩個異常分別爲:github
org.springframework.expression.spel.SpelEvaluationException: EL1004E: Method call: Method service() cannot be found on com.my.blog.springboot.thymeleaf.util.MethodTest type
org.springframework.expression.spel.SpelEvaluationException: EL1011E: Method call: Attempted to call method test() on null context object
Attempted to call method on null context object 調用的方法處於一個空對象中,即調用實例爲空。
解決方案能夠參考個人這篇文章:Method call: Attempted to call method test() on null context objectspring
Method cannot be found 方法不存在
解決方案能夠參考個人這篇文章:Method service() cannot be found on com.my.blog.springboot.thymeleaf.util.MethodTest typeexpress