网上大多数的说法是要加@responseBody 其实是细节问题
1.--------Error resolving template [hello], template might not exist or might not be accessible by any of the configured Template Resolvers
报错原因:spring.thymeleaf.prefix=classpath:/templates后面未加/
正确写法:spring.thymeleaf.prefix=classpath:/templates/
附上thymeleaf配置
spring.thymeleaf.cache=false
#spring thymeleaf
spring.thymeleaf.mode=HTML5
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.suffix=.html
spring.thymeleaf.content-type=text/html