UEditor 前后端分离【java版本】

使用Java集成富文本编辑器——ueditor 在上面的代码中,我们使用Spring MVC创建了一个控制器类,并定义了一个名为ueditor的请求映射。在上面的代码中,我们使用Spring MVC创建了一个控制器类,并定义了一个名为ueditor的请求映射。最后,我们需要在前端页面中引入ueditor的JavaScript文件,并创建一个textarea元素来初始化ueditor。最后,我们需要在前端页面中引入ueditor的JavaScript文件,并创建一个textarea元素来初始化ueditor。根据你的项目需求,进行相应的配置。 阅读详情


Ueditor官网文档地址:http://fex.baidu.com/ueditor/#server-deploy

下载源码包:


1 java后台配置:




下载源码包,解压后把\ueditor-1.4.3.3\ueditor-1.4.3.3\jsp\src\com\baidu\ueditor的文件拷贝到java项目src下。


Base64Uploader.java 因为jdk1.8不支持Base64.decodeBase64(content);

private static byte[] decode(String content) {
return Base64.getDecoder().decode(content);
//Base64.decodeBase64(content);
}


 把config.json 放到src/main/resource



修改ConfigManager.java 文件,把originalPath 修改为:src/main/resources/config.json

/*
* 通过一个给定的路径构建一个配置管理器, 该管理器要求地址路径所在目录下必须存在config.properties文件
*/
private ConfigManager ( String rootPath, String contextPath, String uri ) throws FileNotFoundException, IOException {

rootPath = rootPath.replace( "\\", "/" );

this.rootPath = rootPath;
this.contextPath = contextPath;
this.originalPath = "src/main/resources/config.json";

// if ( contextPath.length() > 0 ) {
// this.originalPath = this.rootPath + uri.substring( contextPath.length() );
// } else {
// this.originalPath = this.rootPath + uri;
// }

this.initEnv();

}



新建一个controller

package com.ganjiangps.wangdaibus.controller;


import java.io.IOException;
import java.io.PrintWriter
百度Ueditor富文本编辑器JSP版本实战详解 UEditor 是由百度前端团队开发的一款富文本编辑器,具备轻量、可定制、扩展性强等特点。它基于浏览器原生特性构建,支持多种后端语言集成,其中 JSP 版本广泛应用于 Java 技术栈项目中。Ueditor 1.4.3.3 JSP版本的源码结构组织清晰,各目录分工明确。以下是主要目录及其功能说明:目录/文件路径功能描述根目录客户端主配置文件,定义工具栏、服务器接口地址、上传参数等根目录编辑器核心JS库,包含所有前端逻辑与命令系统dialogs/子目录。 阅读详情

相关推荐

Java实现前后端分离的ueditor完整后端代码

SSM框架是由Spring, SpringMVC和MyBatis三个框架组成的Java后端开发框架。Spring是一个开源框架,它提供了全面的基础设施支持,用于开发Java应用。Spring的核心特性包括依赖注入(DI)和面向切面编程(AOP)。SpringMVC是Spring的一个模块,是一个基于Java实现MVC设计模式的请求驱动类型的轻量级Web框架。MyBatis是一个支持定制化SQL、存储过程以及高级映射的持久层框架。

weixin_35757191的博客 777

UEditor1.1.2源码及jar包

UEditor1.1.2源码及jar包,留给有需要的人,UEditor1.1.2源码及jar包,留给有需要的人

Ueditor与java整合即拿即用

ueditor(百度富文本编辑器)整和java 只要是java项目就可以导入使用 其依赖的几个jar包 ueditor源码已修改,导入ueditor的jar时,导入本项目已经修改过的 只需配置服务器虚拟目录 和config路径即可 (源码不是本人所修改)

springboot整合ueditor源码(自己写,测试可用,不需要修改ueditor源码)

springboot和ueditor的整合,自己写完测试过可以用,下载下来只需要修改index.html中的地址就可以。具体搭建的步骤在:https://www.jianshu.com/p/006e65711de0 中,大家可以参考。 连资源都不下载就恶意举报的人原地爆炸吧!

springboot版后台管理系统

使用springboot+mybatis开发的一个后台管理系统,主要完成了权限管理模块,集成了shiro和thymeleaf,有代码自动生成功能,学习springboot的可以拿来参考

springboot整合ueditor源码(自己写,测试可用)

springboot和ueditor的整合,自己写完测试过可以用,下载下来只需要修改index.html中的地址就可以。具体搭建的步骤在:https://www.jianshu.com/p/231e83c13610 中,大家可以参考。

前后端分离-资料.rar

docker部署前后端分离项目的配置文件,基本包含了所有配置需要的文本。可以解决,从网页中拷贝配置文件命令,带有特殊字符的问题,方便快速部署。

ueditor java开发前后端分离 后端代码

ueditor源码 java开发前后端分离前端vue 后端ssm。 https://mp.csdn.net/postedit/79937236 csdn写的比较清楚,这里主要提供源码。

Rocky Linux 8.10下用cephadm快速搭建Ceph集群(附华为云镜像源配置)

本文详细介绍了在Rocky Linux 8.10操作系统上使用cephadm快速部署Ceph集群的实战指南,包括环境准备、系统配置、华为云镜像源优化、集群初始化及节点扩展等关键步骤。通过配置华为云镜像源,显著提升部署效率,适合企业级存储解决方案的需求。

weixin_30839881的博客 150

在Ubuntu 20.04上,用EtherCAT Igh 1.6.2驱动高创BD3E伺服电机(附完整C代码)

本文详细介绍了在Ubuntu 20.04实时内核环境下,使用EtherCAT Igh 1.6.2主站驱动高创BD3E伺服电机的完整实现方案。从实时系统配置、伺服电机PDO映射到精确控制线程设计,提供了完整的C代码样例和实际项目中的调试技巧,帮助开发者实现工业自动化中的高精度运动控制。

weixin_30772105的博客 115

浅谈云计算01 | 云计算服务的特点

在当今数字化时代,云计算作为一种强大的技术解决方案,正逐渐改变着企业和个人对信息技术的使用方式。本文将详细探讨云计算的五个主要特点,包括按需自助服务、广泛的网络接入、资源池化、快速弹性伸缩以及可计量服务。

时光札记 1122

Versal ACAP NoC实战:像理解计算机网络一样配置AXI NoC,打通PS与PL数据通路

本文深入探讨了Versal ACAP NoC的配置与优化,通过计算机网络类比解析NoC架构,详细介绍了在VD100开发板上配置AXI NoC实现PS与PL数据交互的实战步骤。文章涵盖NoC组件功能、Vivado配置技巧、性能优化方法及常见问题解决方案,帮助开发者高效打通Versal芯片的数据通路。

weixin_42665255的博客 298

MATLAB船舶开尔文尾迹三维仿真建模

开尔文尾迹介绍 Kelvin最早研究舰船在水面运动在水面上形成波纹的原理,主要针对静水中点源运动的尾迹问题,并给出尾迹的张角和波高分布情况。由 Kelvin 的理论,一般情况下假设由一个理想点源来代替舰船,开尔文尾迹由分歧波和横断波组成,分歧波向船的两侧扩散,而横断波主要向船的后方传播,在相遇的地方两波相干形成尖头波,且尖头波位于尾迹角16°到19.5°之间,又因为尖头波波长过短,以至于无法单独的区分出每个尖头波的波前,所有的波前在视觉效果上就连成一条直线表现为亮线,称为开尔文臂,开尔文臂以船身对称,且角度

qq_19512613的博客 3853

基于YOLOv8的植物生长阶段识别系统设计与实现

本文详细介绍了一个基于YOLOv8深度学习模型的植物生长阶段识别系统,包含完整的数据集构建、模型训练、评估以及基于PyQt5的用户界面开发过程。系统能够自动识别植物在不同生长阶段(如发芽期、生长期、开花期、结果期等)的形态特征,为精准农业和智能种植提供技术支持。文章提供了完整的代码实现,并讨论了模型优化策略和实际应用场景。关键词:植物生长阶段识别、YOLOv8、目标检测、PyQt5、深度学习。

YOLO 470

汽车标定技术(七)--英飞凌TC3xx_Overlay实现页切换

今天说要开个专栏讲讲XCP标定,但在将标定之前,先把英飞凌专门为标定功能设计overlay功能讲解清楚。

认真搞搞汽车MCU 4030

数字信号处理----数字上变频和下变频都FPGA实现

** 数字信号处理基础----信号下变频和解调 一、 任务介绍 数字上变频器(DUC)和数字下变频器(DDC)广泛应用于通信系统,用于信号采样速率的转换。当信号从基带转换至中频( IF )带,需要使用数字上变频器。而数字下变频器是用于将信号从中频( IF )带转换为基带。DUC和DDC通常包括使用混频器进行频率转换,此外还有采样率转换。DUC或DDC的结构主要取决于所需要的转换率。例如,WiMAX (全球互通微波接入)系统典型的转换率为8—10阶。对于如此低的转换率,DUC和DDC只需采用FIR滤波器架构。

Born_toward的博客 3万+

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: spring-mobile 获取device 的两种方法
下一篇: 阿里云服务器 liunx 安装配置 redis
phpfzh
博客等级 码龄10年 22粉丝 102原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址