当前位置: 首页 > news >正文

厦门市建设局查询保障摇号网站首页写一个简单的网页

厦门市建设局查询保障摇号网站首页,写一个简单的网页,急速浏览器打开新网站,wordpress网站访问很慢目录一、异常错误二、原因三、解决方法方法1. 将无法编译的静态资源放入可编译目录下方法2. 重新编译项目加载资源方法3. 修改pom.xml资源配置文件方法4. 不连接远程数据库启动#xff0c;使用本地数据库一、异常错误 Springboot使用thymeleaf#xff0c;并连接远程数据库启… 目录一、异常错误二、原因三、解决方法方法1. 将无法编译的静态资源放入可编译目录下方法2. 重新编译项目加载资源方法3. 修改pom.xml资源配置文件方法4. 不连接远程数据库启动使用本地数据库一、异常错误 Springboot使用thymeleaf并连接远程数据库启动时无法加载resources中的静态资源 浏览器报错 Failed to load resource: the server responded with a status of 404 ()后端启动时报错 Servlet.service() for servlet [dispatcherServlet] in context with path [/ce] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template 前端打开页面时后端报错 Exception processing template /web/studyOutline/studyOutline: Error resolving template [/web/studyOutline/studyOutline], template might not exist or might not be accessible by any of the configured Template Resolvers二、原因 打包编译项目显示找不到js、css、html等静态资源但本地路径并没有写错于是我去找编译文件查看是不是静态资源没有编译到打开项目下的target文件夹 前往classes文件夹发现项目resources下对应的templates韦文件夹没有编译到缺少静态资源当然会报错了 三、解决方法 方法1. 将无法编译的静态资源放入可编译目录下 既然服务器不能编译templates文件夹那么把templates文件夹放入calsses路径下即可这样处理就能获取templats下的静态资源了但如果静态资源有改动需要手动放入classes文件夹下再次启动项目即可读取资源 如果再次启动项目还是显示找不到js、css、html等静态资源请看方法2 方法2. 重新编译项目加载资源 由于服务器编译拦截了静态资源导致出现异常需要重新打包编译 打开IDEA带的Maven管理双击clean清除由项目编译创建的target 再双击install安装jar包到本地仓库 项目打包出现异常 [INFO] Using UTF-8 encoding to copy filtered resources. [INFO] Using UTF-8 encoding to copy filtered properties files.系统默认编码是GBKmaven提升需要使用UTF-8在setting中修改项目编码为UTF-8 出现 Failed to execute goal是由于测试用例有问题 Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-test) on project springboot_04_profile: Input length 1 - [Help 1]选择跳过测试用例 再次双击install编译成功启动项目即可读取静态资源 如果设置编码还是打包失败或者显示找不到js、css、html等静态资源请看方法3 方法3. 修改pom.xml资源配置文件 如果设置编码还是打包失败或者显示找不到js、css、html等静态资源说明服务器没有访问资源的权限需要在pom.xml的build下引入资源文件 !-- 引入静态资源文件 --resourcesresourcedirectorysrc/main/resources/directoryincludesinclude**/*.css/includeinclude**/*.js/includeinclude**/*.html/includeinclude**/*.png/includeinclude**/*.properties/includeinclude**/*.yml/includeinclude**/*.xml/includeinclude**/*.conf/include/includes/resource/resources再次insall显示打包成功浏览器404的问题也解决了加载了静态资源 方法4. 不连接远程数据库启动使用本地数据库 开头说了Springboot使用thymeleaf并连接远程数据库启动时无法加载resources中的静态资源这是一个大坑如果不连接远程数据库启动则不存在服务器访问资源的问题 打开application.properties配置文件注释掉连接远程数据库的代码改用本地数据库就不会有访问资源的问题了可以直接加载浏览器不再出现Failed to load resource问题 异常索引 Failed to load resource: the server responded with a status of 404 ()Servlet.service() for servlet [dispatcherServlet] in context with path [/ce] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving templateException processing template “/web/studyOutline/studyOutline”: Error resolving template [/web/studyOutline/studyOutline], template might not exist or might not be accessible by any of the configured Template Resolvers[INFO] Using ‘UTF-8’ encoding to copy filtered resources. [INFO] Using ‘UTF-8’ encoding to copy filtered properties files.Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-test) on project springboot_04_profile: Input length 1 - [Help 1]
http://www.dnsts.com.cn/news/5507.html

相关文章:

  • 装修设计网站哪个好建设个人网站第一步这么做
  • 阿里网站备案管理系统淘宝客帮做网站
  • 上海静安做网站多少钱西安网站建设有那些公司好
  • 公司网站模板discuz手机版
  • 手机网站大全wordpress 缩进
  • 国外网站素材深圳网站开发建设
  • 四川网站开发上海缘震网络科技有限公司
  • 建设网站学习怎么做阿里巴巴国际网站
  • 织梦网站采集规则虹口建设机械网站
  • 互动科技 网站建设电商思维做招聘网站
  • 汕头网站快速排名企业主页是什么意思
  • 创意策划网站网站建设初期
  • 电子书网站怎么做专业的魔站建站系统
  • 顺德网站制作案例机构设计云网站
  • 购物网站开发文档wordpress+上一篇+下一篇
  • 信誉好的做pc端网站做ppt常用的网站
  • 所有手机浏览器大全百度排名优化咨询电话
  • 近10天的时政新闻上海百度关键词优化公司
  • 阳春市建设局网站抖音推广运营公司
  • 有网站怎么做seo推广网络培训网站开发文献综述
  • 网站建设的外文参考文献两个wordpress
  • 网站建设知名excel动态表格图表制作
  • 手机音乐网站程序源码iis架设jsp网站
  • 网站建设类岗位淘宝网站建设没法上传怎么办
  • 门户网站是啥网站每月流量
  • 上海seo网站推广ppt模板下载完整版
  • 酒店网站制作策划深圳做网站d
  • 建设网站选什么地方的主机wordpress调用指定文章图片
  • 网站主页图片设计网站更新提醒
  • 网站建设的目标是html网站开发工具下载