1、进入设置---markdown
2、
one:英文状态下输入 ` 键后,复制粘贴你的代码块即可。
如下:
·········
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://localhost:3306/springboot?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
driver-class-name: com.mysql.jdbc.Driver
username: root
password: root
jpa:
database: mysql
show-sql: true
generate-ddl: true
server:
tomcat:
max-http-post-size: 0
·········
效果如下:

two:利用pre标签,复制粘贴到标签内即可。
如下:
<pre>
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://localhost:3306/springboot?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
driver-class-name: com.mysql.jdbc.Driver
username: root
password: root
jpa:
database: mysql
show-sql: true
generate-ddl: true
server:
tomcat:
max-http-post-size: 0
</pre>
效果如下:

three:利用code标签,复制粘贴你的代码块到标签内即可。
如下:
<code>
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://localhost:3306/springboot?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
driver-class-name: com.mysql.jdbc.Driver
username: root
password: root
jpa:
database: mysql
show-sql: true
generate-ddl: true
tomcat:
max-http-post-size: 0
</code>
效果如下:

查阅资料后,发现一种是我想要的,如下:
代码:
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://localhost:3306/springboot?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
driver-class-name: com.mysql.jdbc.Driver
username: root
password: root
jpa:
database: mysql
show-sql: true
generate-ddl: true
# hibernate:
# ddl-auto: validate
server:
tomcat:
max-http-post-size: 0
图片:
image
括号里面是图片地址;
标题
hello
hello
hello
无序列表
无序列表使用星号 (*)、加号(+)或是减号(-) 作为列表标记
三者均可,其后需要加一个空格,如下两种写法等价:无序列表使用星号 (*)、加号(+)或是减号(-) 作为列表标记
嵌套 >
*斜体*
**粗体**
++下划线++
~~删除线~~
==文本高亮==
**** (分隔线1)
---- (分隔线2)
链接、图片、注释
学习[代码块](https://www.zhihu.com/signup?next=%2F)的相关内容;
学习代码块的相关内容;
*** 语法格式:


百度
image
百度2
image
无序列表
* + - 加空格
- hello
- hi
over!
网友评论