栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

个人博客网站 (3/3) - 插件集成笔记

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

个人博客网站 (3/3) - 插件集成笔记

插件集成

发布博客页面:

  • 编辑器 markdown https://pandao.github.io/editor.md

博客详情页面:

  • 内容排版 typo.css、感觉没啥用

  • 动画 animate.css https://animate.style/#usage

  • 代码高亮 prism https://prismjs.com/

  • 目录生成 Tocbot http://tscanlin.github.io/tocbot/ 元素有id才可以生成

  • 二维码生成 qrcode.js https://davidshimjs.github.io/qrcodejs/

  • 平滑滚动 jquery.scrollTo https://github.com/flesler/jquery.scrollTo

  • 滚动侦测 waypoints http://imakewebthings.com/waypoints/

    • 在顶端不显示浏览工具栏
  • markdown转化成HTML: github.com/atlassian/commonmark-java

框架搭建

IDEA>用的社区版没有spring initializer

重装参考 https://www.bilibili.com/read/cv13085101?from=articleDetail&spm_id_from=333.976.b_726561645265636f6d6d656e64496e666f.4

引入模块:

  • Springboot模块

  • web:Tomcat

  • Thymeleaf:前端页面集成

  • JPA:数据操作

  • MySQL

  • Aspects:Spring AOP——没有另外添加

    		
                org.aspectj
                aspectjweaver
            
    
            
                org.springframework.boot
                spring-boot-starter-aop
                test
            
    
  • DevTools: 开发工具

进行配置:src/main/resources/application.properties

后续和20集一致。


出现的报错是org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1

原因是IDEA默认的文件编码默认是GBK,这里改下设置

idea编码–file-settings–file Encodings default选项改成UTF-8


IDEA头注释模板设置

File -> settings -> editor -> file and code templates


错误页面可以建在:static/templates下 error目录

随后错误处理具体就是跟着老师走21 22。

页面处理

前面制作的静态页面导入template和static,注意修改路径,两种方式

1.写成thymeleaf格式每一个改成:th:href="@{/css/new.css}

2.套用thymeleaf模板https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#fragments

以及错误页面美化

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/356400.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号