Spring Boot整合UEditor不修改源码
1.创建Springboot项目,目录结构如下(在resources中static/ueditor/jsp/config.json)
2.pom文件引入
<dependency>
<groupId>cn.jasonone.ueditor</groupId>
<artifactId>ueditor-spring-boot-starter</artifactId>
<version>1.1.4</version>
</dependency>
3. Springboot application.yml配置(可选配置)
ue:
root-path: classpath:/static #文件存储根目录(可选配置),默认为[classpath:/static]
server-url: /ueditor/jsp/controller #服务器统一请求接口路径(可选配置),默认为[/ueditor/jsp/controller]
upload: cn.jasonone.ueditor.upload.LocationFileStorage #文件持久化处理类(可选配置),默认为[cn.jasonone.ueditor.upload.LocationFileStorage]
4.UEditor配置(必选)
- static/ueditor/ueditor.config.js 将serverUrl 改为application.yml 中ue.server-url 的值
//...
//服务器统一请求接口路径
, serverUrl: URL + "jsp/controller"
//...
5.HTML代码(index.html)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<script type="text/plain" id="editor"></script>
<script th:src="@{/ueditor/ueditor.config.js}"></script>
<script th:src="@{/ueditor/ueditor.all.js}"></script>
<script th:src="@{/ueditor/lang/zh-cn/zh-cn.js}"></script>
<script>
UE.getEditor('editor');
</script>
</body>
</html>
项目地址:https://gitee.com/hmjasonone/ueditor-spring-boot-stater
错误:Unable to read meta-data for class com.jason.ueditor.UeditorAutoConfiguration 出错版本: 1.1.0 解决办法: 将Jar包更新到1.1.3版本
Spring Boot整合UEditor不修改源码的更多相关文章
- Spring Boot Dubbo 应用启停源码分析
作者:张乎兴 来源:Dubbo官方博客 背景介绍 Dubbo Spring Boot 工程致力于简化 Dubbo | grep tid | grep -v "daemon" tid ...
- 涨姿势:Spring Boot 2.x 启动全过程源码分析
目录 SpringApplication 实例 run 方法运行过程 总结 上篇<Spring Boot 2.x 启动全过程源码分析(一)入口类剖析>我们分析了 Spring Boot 入 ...
- Spring Boot REST(二)源码分析
Spring Boot REST(二)源码分析 Spring 系列目录(https://www.cnblogs.com/binarylei/p/10117436.html) SpringBoot RE ...
- Spring Boot 2.x 启动全过程源码分析
Spring Boot 2.x 启动全过程源码分析 SpringApplication 实例 run 方法运行过程 上面分析了 SpringApplication 实例对象构造方法初始化过程,下面继续 ...
- Spring Boot 2.x 启动全过程源码分析(上)入口类剖析
Spring Boot 的应用教程我们已经分享过很多了,今天来通过源码来分析下它的启动过程,探究下 Spring Boot 为什么这么简便的奥秘. 本篇基于 Spring Boot 2.0.3 版本进 ...
- SpringBoot 源码解析 (五)----- Spring Boot的核心能力 - 自动配置源码解析
在上一篇博客中分析了springBoot启动流程,大体的轮廓只是冰山一角.今天就来看一下springBoot的亮点功能:自动化装配功能. 先从@SpringBootApplication开始.在启动流 ...
- Spring Boot整合ElasticSearch和Mysql 附案例源码
导读 前二天,写了一篇ElasticSearch7.8.1从入门到精通的(点我直达),但是还没有整合到SpringBoot中,下面演示将ElasticSearch和mysql整合到Spring Boo ...
- Spring Boot系列(三):Spring Boot整合Mybatis源码解析
一.Mybatis回顾 1.MyBatis介绍 Mybatis是一个半ORM框架,它使用简单的 XML 或注解用于配置和原始映射,将接口和Java的POJOs(普通的Java 对象)映射成数据库中的记 ...
- spring boot 整合 百度ueditor富文本
百度的富文本没有提供Java版本的,只给提供了jsp版本,但是呢spring boot 如果是使用内置tomcat启动的话整合jsp是非常困难得,今天小编给大家带来spring boot整合百度富文本 ...
随机推荐
- 性能测试基础---LR参数化相关
性能测试脚本的增强:·参数化·关联·事务·检查点·思考时间·集合点 ·参数化:模拟不同用户的不同请求. ·为什么要做参数化? ·功能:通常来说,系统的某些业务数据具有唯一性的要求. ·性能:一般来说, ...
- php责任链模式(The chain of responsibility pattern)
送家人从火车站归来,继续码. <?php /* The chain of responsibility pattern decouples the sender of a request fro ...
- python3接口自动化:绕过验证码登陆
import requests import json from time import sleep class Test: url= "http://www.cnblogs.com/&qu ...
- 通过PHP自带的$_SERVER判断 自动识别移动设备
因为站点需要,手机端和PC端分离,所以通过PHP自带的$_SERVER判断 自动识别移动设备 代码如下: <?php $agent = $_SERVER['HTTP_USER_AGENT']; ...
- 高性能MySQL(一)——索引
一.mysql索引分类 单值索引:一个索引只包含单个列,一个表可以有多个单列索引 唯一索引:索引列的值必须唯一,但允许有空值 复合索引:一个索引包含多个列 基本语法: 创建:1.CREATE [UNI ...
- HDFS的读写流程
1.2. 客户端向NameNode发起创建文件的请求,在NameNode上创建一个文件名,并且返回一个输出流 3.客户端向输出流发起写入数据的请求 4.输出流向NameNode请求写数据,NameNo ...
- python Tkinter的Text组件中创建x轴和y轴滚动条,并且text文本框自动更新(三)
要求对文件边读边写并显示对话框. 1.加线程之后,必须要文件写完才显示对话框.错误代码: # encoding: utf-8 import time from Tkinter import * imp ...
- Linux 防火墙 | Linux 服务器如何开放端口 配置防火墙
sudo ufw status(如果你是root,则去掉sudo,ufw status)可检查防火墙的状态,我的返回的是:inactive(默认为不活动).sudo ufw version防火墙版本: ...
- 最近的思考x
数据结构与文件格式: 自我管理与成长管理: 静态分析与动态分析.
- Codeforces Round #603 (Div. 2) C. Everyone is a Winner! (数学)
链接: https://codeforces.com/contest/1263/problem/C 题意: On the well-known testing system MathForces, a ...