template might not exist or may not be accessible by any of the configured Template Resolvers檢視解析錯誤
樓主用的是springboot+hibernate+thymeleaf。不知道這個選型是否和問題有相關性,姑且列在這裡,可以參考。
一開始遇到這個問題的時候上網查過,看到大多提到什麼取消斜槓的方法,並沒有解決。自己搗鼓下來發現是遺漏了@Response註解
將@Controller改為@RestController(也相當於改為@Responsebody和@Controller合併在一起)就可以解決
原因在於這裡teacherRepository.save(teacher)的返回值是一個json字串。
而@Responsebody的作用是:將Controller的方法返回的物件,通過適當的HttpMessageConverter轉換為指定格式後,寫入到Response物件的body資料區。也就是@Responsebody適用於返回不是html頁面,而是其他某種格式的資料時(如json、xml等)
相關推薦
template might not exist or may not be accessible by any of the configured Template Resolvers檢視解析錯誤
樓主用的是springboot+hibernate+thymeleaf。不知道這個選型是否和問題有相關性,姑且列在這裡,可以參考。一開始遇到這個問題的時候上網查過,看到大多提到什麼取消斜槓的方法,並沒有解決。自己搗鼓下來發現是遺漏了@Response註解將@Controlle
Spring Boot使用thymeleaf模板時報異常:template might not exist or might not be accessible by any of the configured Template Resolvers
logs pla 開頭 spring 方法 temp ring mode acc 錯誤如下: template might not exist or might not be accessible by any of the configured Template R
Error_template might not exist or might not be accessible by any of the configured Template Resolver
錯誤提示為: Error resolving template "login.html", template might not exist or might not be accessible b
Error resolving template [index], template might not exist or might not be accessible by any of the configured Template Resolvers
1,首先我按照網上找的在controller上面的註解改成@RestController,這個是不行的。給我返回了一個 ------------------------- /login 2,把返回的 return "/login" 改成
Eclipse裏Tomcat報錯:Document base ……does not exist or is not a readable directory
str doc tomcat的配置 metadata tom com tor tro 路徑和 如標題所述 在eclipse中導入工程運行時提示 目錄不存在。 解決辦法: 檢查eclipse 中tomcat的配置發布路徑和 conf/server.xml 中的發布路徑
Document base E:\apache-tomcat-6.0.37(32)\webapps\xxx does not exist or is not a readable directory
Document base E:\apache-tomcat-6.0.37(32)\webapps\xxx does not exist or is not a readable directory 啟動伺服器,報上述錯誤,是因為在伺服器中(如tomcat)刪除了某專案,單殘留的配置檔案沒刪
Document base xxx does not exist or is not a readable direct
詳細錯誤資訊如下:嚴重: Error starting static Resourcesjava.lang.IllegalArgumentException: Document base C:\tomcat7054\webroot\testcs_dn-web does not
\webapps\xxxx does not exist or is not a readable directory
Tomcat啟動專案就報錯 java.lang.IllegalArgumentException: Document base D:\apache-tomcat-7.0.61\webapps\xxxx does not exist or is not a readable director
CentOS 7 搭建 Hadoop 2.9.1 遇到的坑之 storage directory does not exist or is not accessible.
2018-06-14 11:42:28,500 WARN org.apache.hadoop.hdfs.server.common.Storage: Storage directory /home/hadoopCluster/hadoop-2.9.1/tmp/dfs/name
mysqld_safe啟動報錯 mysqld_safe The file /usr/local/mysql/bin/mysqld does not exist or is not executable
報錯(如下),但是使用mysqld直接啟動沒有問題。 150718 00:03:38 mysqld_safe Logging to '/var/log/mysqld.log'. 150718 00:03:38 mysqld_safe The file /usr/loca
ASM problem : ORA-15001: diskgroup "DGROUP1" does not exist or is not mounted ORA-15040: diskgroup is incomplete
col over confirm ora-12547 open bus his -i ora- ============================================================= mos中的詳細解釋: ODA: After
Maven 項目創建時遇到問題 (Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:1.0 from any of the configured repositories.)
href .html 圖片 config pos maven 沒有 web con 解決辦法:配置一下 maven阿裏雲鏡像,親測有效,完美解決! 配置教程: http://blog.java1234.com/blog/articles/252.html 試過網上的
建立maven專案的時候:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:1.0 from any of the configured repositories. 解決辦法
問題: https://yq.aliyun.com/ziliao/364921 嘗試沒成功。 https://www.aliyun.com/jiaocheng/296712.html 嘗試沒成功。
Could not find output/file.out in any of the configured local directories
轉載:http://blog.pureisle.net/archives/1785.html 十二、如果遇到如下錯誤: FAILED java.lang.IllegalArgumentException: java.net.URISyntaxException: R
Authentication method 'caching_sha2_password' not supported by any of the available plugins.
開發十年,就只剩下這套架構體系了! >>>
異常:Error resolving template "xxx", template might not exist or might not be accessible...解決辦法
控制臺 返回值 resp body 網上 資料 必須 exist https 簡單表述:控制臺出現了這個異常:Error resolving template "xxx", template might not exist or might not be accessibl
SpringBoot增加jsp頁面支援,Error resolving template template might not exist or might not be accessible
1.增加mvc支援,一定要注意這種臺階式的配置檔案格式,,,(裡面還有空格的坑),一定要嚴格對照 2.啟動類增加一個重寫的方法 @SpringBootApplication @MapperScan("com.java.dao") public class StartApplicat
spring boot 踩坑日記: Error resolving template "index", template might not exist or might not be accessi
訪問index時報錯: org.thymeleaf.exceptions.TemplateInputException: Error resolving template "index", template might not exist or might not be a
Error resolving template "index", template might not exist or might not be accessible b
出現這種問題的排查思路: 1 檢查是否路徑出現錯誤 //正確寫法 @RequestMapping({"/",&
啟動docker容器提示"docker: Error response from daemon: Container command not found or does not exist"的原因
docker容器匯入匯出有兩種方法: 一種是使用save和load命令使用例子如下: docker save ubuntu:load>/root/ubuntu.tar docker load<ubuntu.tar 一種是使用export和import命令使用