全部 文章 问答 分享 共找到379个相关内容
[文章] 阳光沙滩博客系统-管理中心评论模块
PathVariable("commentId")StringcommentId){returncommentService.deleteCommentById(commentId);}门户可以删除,管理中心也可以删除
[文章] 管理中心 友情链接bug
$message.error(result.message);this.resetPasswordValue='';}})}分割线在修门户的bug时无意中发现了一个管理中心的bug/(ㄒoㄒ)/~~在课程中我们添加友链就是通过
[问答] 管理中心文章文章条件查询返回数据不一致?
管理中心文章条件查询返回到后端的数据不一致有存在文章分类/关键字/状态时返回为data.content在没有分类/关键字/状态时返回为contentscontents和content不一样时总有部分功能无法实现
[问答] 博客系统管理中心部署到阿里云Nginx服务器上后报错!登陆成功后不跳转到主页,刷新后404
博客系统管理中心部署到Nginx服务器上后报错!登陆成功后不跳转到主页,刷新后404。怎么回事呢,是Nginx配置的问题吗?
[文章] 阳光沙滩博客系统-管理中心网站信息模块
获取时机:管理中心获取访问量/前端如果有需要的话也可以获取接口:@PreAuthorize("@permission.admin()")@GetMapping("/view_count
[问答] 关于JavaWeb后端数据库链接报错问题
这几天在写JavaWeb前端管理中心的时候,由于之前把JavaWeb的后端项目package出来在本机(跑虚拟机或者IDEA同时开电脑承受不住。。)
2022-06-28 11:16
·
JavaWeb
[文章] 阳光沙滩博客系统-管理中心文章模块
以前的做法则是删除了文章,同是会删除对应的评论,对应的图片之类的...物理删除:/***如果是多用户,用户不可以删除,删除只是修改状态*管理可以删除*<p>*做成真的删除**@paramarticleId
[文章] 阳光沙滩博客系统-管理中心轮播图管理
");}获取轮播图列表除了前端,后台也是要获取轮播图列表的,因为我们要管理它呀@PreAuthorize("@permission.admin()")@GetMapping
[文章] 阳光沙滩博客系统-集成Swagger2-ui
description("门户接口文档")//设置文档的描述.version(VERSION)//设置文档的版本信息->1.0.0Versioninformation.build();}/***管理中心
[问答] 博客系统swagger配置扫描不到
VERSION) // 设置文档的版本信息-> 1.0.0 Version information
.build();
}
/**
* 管理中心
2022-04-24 22:35
·
博客系统
[问答] 博客部署问题
只有一个域名,一个域名下同时部署前台和管理中心,有啥方法没,买第二个域名还要备案太慢了
[问答] 博客管理中心部署404
以下为nginxlog2020/08/2308:46:19[error]28#28:*16open()"/usr/share/nginx/html/biz/user/check-token"failed(2:Nosuchfileordirectory),client:36.100.41.190,server:sang66.icu,request:"GET/biz/user/check-tokenHTTP/1.1",host:"39.99.236.52",referrer:"http://39.99.236.52/"2020/08/2308:50:25[error]28#28:*22open()"/usr/share/nginx/html/biz/user/check-token"failed(2:Nosuchfileordirectory),client:36.100.41.190,server:sang66.icu,request:"GET/biz/user/check-tokenHTTP/1.1",host:"39.99.236.52",referrer:"http://39.99.236.52/"2020/08/2308:52:05[error]28#28:*1open()"/usr/share/nginx/html/biz/user/check-token"failed(2:Nosuchfileordirectory),client:36.100.41.190,server:sang66.icu,request:"GET/biz/user/check-tokenHTTP/1.1",host:"39.99.236.52",referrer:"http://39.99.236.52/"2020/08/2308:52:12[error]28#28:*9open()"/usr/share/nginx/html/biz/user/check-token"failed(2:Nosuchfileordirectory),client:36.100.41.190,server:sang66.icu,request:"GET/biz/user/check-tokenHTTP/1.1",host:"39.99.236.52",referrer:"http://39.99.236.52/"2020/08/2308:52:13[error]28#28:*12open()"/usr/share/nginx/html/biz/user/check-token"failed(2:Nosuchfileordirectory),client:36.100.41.190,server:sang66.icu,request:"GET/biz/user/check-tokenHTTP/1.1",host:"39.99.236.52",referrer:"http://39.99.236.52/"2020/08/2308:58:29[error]28#28:*20open()"/usr/share/nginx/html/biz/user/check-token"failed(2:Nosuchfileordirectory),client:36.100.41.190,server:sang66.icu,request:"GET/biz/user/check-tokenHTTP/1.1",host:"39.99.236.52",referrer:"http://39.99.236.52/"2020/08/2309:00:29[error]21#21:*2open()"/usr/share/nginx/html/biz/user/check-token"failed(2:Nosuchfileordirectory),client:36.100.41.190,server:localhost,request:"GET/biz/user/check-tokenHTTP/1.1",host:"39.99.236.52",referrer:"http://39.99.236.52/"配置文件user nginx;worker_processes 1;error_log /var/log/nginx/error.logwarn;pid /var/run/nginx.pid;events{ worker_connections 1024;}http{#博客服务器,多个可以实现负载均衡 upstreamblog{ server39.99.236.52:8004weight=1; } include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr-$remote_user[$time_local]"$request"' '$status$body_bytes_sent"$http_referer"' '"$http_user_agent""$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; server{listen 80;server_name localhost;#charsetkoi8-r;#access_log /var/log/nginx/host.access.log main;#用户相关的请求,转到sob-bloglocation^~/user/{ proxy_pass http://blog;#以下是一些反向代理的配置可删除proxy_redirect off; #后端的Web服务器可以通过X-Forwarded-For获取用户真实IPproxy_set_header Host$host;proxy_set_header Cookie$http_cookie;proxy_set_header X-Real-IP$remote_addr; proxy_set_header X-Forwarded-For$proxy_add_x_forwarded_for;proxy_set_header HTTP_X_FORWARDED_FOR$remote_addr;proxy_set_header X-Forwarded-Server$host; } location^~/admin/{ proxy_pass http://blog;#以下是一些反向代理的配置可删除proxy_redirect off; #后端的Web服务器可以通过X-Forwarded-For获取用户真实IPproxy_set_header Host$host;proxy_set_header Cookie$http_cookie;proxy_set_header X-Real-IP$remote_addr; proxy_set_header X-Forwarded-For$proxy_add_x_forwarded_for;proxy_set_header HTTP_X_FORWARDED_FOR$remote_addr;proxy_set_header X-Forwarded-Server$host; } location^~/portal/{ proxy_pass http://blog;#以下是一些反向代理的配置可删除proxy_redirect off; #后端的Web服务器可以通过X-Forwarded-For获取用户真实IPproxy_set_header Host$host;proxy_set_header Cookie$http_cookie;proxy_set_header X-Real-IP$remote_addr; proxy_set_header X-Forwarded-For$proxy_add_x_forwarded_for;proxy_set_header HTTP_X_FORWARDED_FOR$remote_addr;proxy_set_header X-Forwarded-Server$host; }#其他访问访问根目录wwwrootlocation/{ root /usr/share/nginx/html;index index.htmlindex.htm;}}}
[文章] 阳光沙滩博客后端踩坑
管理中心获取文章详情API--getArticle()其中需要把标签labels从形如"java-spring-后端"的格式,拆散填入列表List中,在修改getLabels()方法时
2020-08-22 18:13
·
踩坑
[问答] 博客系统前端管理中心跳转页面出错,帮孩子看看吧。。
当我点击分类管理的时候,从内容页面跳转就会多个/content,从用户页面跳转就会多个/user导致一直跳转不到正确的页面。。也不知道哪里错了。。也不知道该帖哪里的代码。。
[问答] JavaWeb前端管理中心密码加密疑惑
在学习过程中发现康师傅视频P55中提到,需要将前端密码加密如图示:
但是这个api请求之后,在Java后端会将这个传进来加密的MD5值在进行加密一次,这不是相当于将md5值在前端加密了一次后,在后端又加密了一次。。后端加密图:
[问答] 博客管理中心发表文章标签问题
提交完之后标签第一个咋会出来个undefinedlettemLabels;//先处理一下标签console.log(this.labelList);this.labelList.forEach((item,index)=>{temLabels+=item;console.log(temLabels);if(index!==this.labelList.length-1){temLabels+='-';}})this.article.labels=temLabels;
2020-08-21 19:04
·
博客管理中心
[文章] 阳光沙滩博客系统-管理中心友情连接模块
添加友情连接接口@PreAuthorize("@permission.admin()")@PostMappingpublicResponseResultaddFriendsLink(@RequestBodyFriendLinkfriendLink){returnfriendLinkService.addFriendLink(friendLink);}添加友情链接实现/***添加友情连接**@paramfriendLink*@return*/@OverridepublicResponseResultaddFriendLink(FriendLinkfriendLink){//判断数据Stringurl=friendLink.getUrl();if(TextUtils.isEmpty(url)){returnResponseResult.FAILED("链接Url不可以为空.");}Stringlogo=friendLink.getLogo();if(TextUtils.isEmpty(logo)){returnResponseResult.FAILED("logo不可以为空.");}Stringname=friendLink.getName();if(TextUtils.isEmpty(name)){returnResponseResult.FAILED("对方网站名不可以为空.");}//补全数据friendLink.setId(idWorker.nextId()+"");friendLink.setUpdateTime(newDate());friendLink.setCreateTime(newDate());//保存数据friendLinkDao.save(friendLink);//返回结果returnResponseResult.FAILED("添加成功.");}删除友情连接接口@PreAuthorize("@permission.admin()")@DeleteMapping("/{friendLinkId}")publicResponseResultdeleteFriendLink(@PathVariable("friendLinkId")StringfriendLinkId){returnfriendLinkService.deleteFriendLink(friendLinkId);}删除接口实现@OverridepublicResponseResultdeleteFriendLink(StringfriendLinkId){intresult=friendLinkDao.deleteAllById(friendLinkId);if(result==0){returnResponseResult.FAILED("删除失败.");}returnResponseResult.SUCCESS("删除成功.");}更新友情链接接口@PreAuthorize("@permission.admin()")@PutMapping("/{friendLinkId}")publicResponseResultupdateFriendLink(@PathVariable("friendLinkId")StringfriendLinkId,@RequestBodyFriendLinkfriendLink){returnfriendLinkService.updateFriendLink(friendLinkId,friendLink);}更新接口实现/***更新内容有什么:*logo*对方网站的名称*url*order**@paramfriendLinkId*@paramfriendLink*@return*/@OverridepublicResponseResultupdateFriendLink(StringfriendLinkId,FriendLinkfriendLink){FriendLinkfriendLinkFromDb=friendLinkDao.findOneById(friendLinkId);if(friendLinkFromDb==null){returnResponseResult.FAILED("更新失败.");}Stringlogo=friendLink.getLogo();if(!TextUtils.isEmpty(logo)){friendLinkFromDb.setLogo(logo);}Stringname=friendLink.getName();if(!TextUtils.isEmpty(name)){friendLinkFromDb.setName(name);}Stringurl=friendLink.getUrl();if(!TextUtils.isEmpty(url)){friendLinkFromDb.setUrl(url);}friendLinkFromDb.setOrder(friendLink.getOrder());friendLinkFromDb.setUpdateTime(newDate());//保存数据friendLinkDao.save(friendLinkFromDb);returnResponseResult.SUCCESS("更新成功.");}获取友情链接列表接口@PreAuthorize("@permission.admin()")@GetMapping("/list/{page}/{size}")publicResponseResultlistFriendLinks(@PathVariable("page")intpage,@PathVariable("size")intsize){returnfriendLinkService.listFriendLinks(page,size);}实现@OverridepublicResponseResultlistFriendLinks(intpage,intsize){if(page<Constants.Page.DEFAULT_PAGE){page=Constants.Page.DEFAULT_PAGE;}if(size<Constants.Page.DEFAULT_SIZE){size=Constants.Page.DEFAULT_SIZE;}//创建条件Sortsort=newSort(Sort.Direction.DESC,"createTime","order");Pageablepageable=PageRequest.of(page-1,size,sort);Page<FriendLink>all=friendLinkDao.findAll(pageable);returnResponseResult.SUCCESS("获取列表成功.").setData(all);}获取友情链接接口@PreAuthorize("@permission.admin()")@GetMapping("/{friendLinkId}")publicResponseResultgetFriendLink(@PathVariable("friendLinkId")StringfriendLinkId){returnfriendLinkService.getFriendLink(friendLinkId);}获取友情链接实现@OverridepublicResponseResultgetFriendLink(StringfriendLinkId){FriendLinkfriendLink=friendLinkDao.findOneById(friendLinkId);if(friendLink==null){returnResponseResult.FAILED("友情链接不存");}returnResponseResult.SUCCESS("获取成功").setData(friendLink);}
[文章] 个人博客管理中心登录验证码加载多次问题
#问题在登录页面中的验证码中,不管是刷新页面,还是每一次点击验证码都会加载两次,(也就是每点击一下获取验证码,请求两次接口)el-image标签<el-imageclass="admin-login-captcha-image":src="this.verificationCodeUrl"@click="getCaptcha"/>getCaptcha函数//获取验证码getCaptcha(){this.verificationCodeUrl='/user/getCaptcha/'+this.loginInfo.captchaKey+'?date='+Date.parse(newDate());},解决将el-image标签换成原生的image标签即可。这可能是elementui的bug
[文章] 博客系统管理中心部署Nginx开启Gzip
背景第一次部署完后,配置文件中没开启gzip访问速度10s+开启gzip后3s+配置文件修改#修改配置为gzipon;#开启gzip压缩功能gzip_min_length10k;#设置允许压缩的页面最小字节数;这里表示如果文件小于10个字节,就不用压缩,因为没有意义,本来就很小.gzip_buffers416k;#设置压缩缓冲区大小,此处设置为4个16K内存作为压缩结果流缓存gzip_http_version1.1;#压缩版本gzip_comp_level2;#设置压缩比率,最小为1,处理速度快,传输速度慢;9为最大压缩比,处理速度慢,传输速度快;这里表示压缩级别,可以是0到9中的任一个,级别越高,压缩就越小,节省了带宽资源,但同时也消耗CPU资源,所以一般折中为6gziptypestext/csstext/xmlapplication/javascript;#制定压缩的类型,线上配置时尽可能配置多的压缩类型!gzip_disable"MSIE[1-6]\.";#配置禁用gzip条件,支持正则。此处表示ie6及以下不启用gzip(因为ie低版本不支持)gzipvaryon;#选择支持varyheader;改选项可以让前端的缓存服务器缓存经过gzip压缩的页面;这个可以不写,表示在传送数据时,给客户端说明我使用了gzip压缩重启下下就好。确认是否开启了?浏览器看效果1:打开网络然后强制刷新一次页面,就看到这个地方gzip是否打开了。速度是不是蹭蹭的呢
2020-12-09 21:33
·
nginx
- 1
- 2
- 3
- 4
- 5
- 6
- 13