使用 axios 后台无法接收到数据的解决方案 如果想看排错思路的,可以看完踩坑经历,想直接要结果的,可以直接看解决方案。 踩坑经历 最近我在使用 SSM + Vue 做自己的小项目。Dao层 和 Service层 之类的代码已经写好了,就差 Controller层 和 Vue 的视图层还没有完成。 ...
分类:
移动开发 时间:
2020-06-25 10:13:27
阅读次数:
144
方法1: @RequestMapping(value="/aliang",produces = "text/plain;charset=utf-8")@ResponseBody需要在每一个的方法中都要写上 produces = "text/plain;charset=utf-8" 方法1: <mvc ...
分类:
Web程序 时间:
2020-06-25 09:36:25
阅读次数:
83
1.下载UEditor 2.新闻上传 package Controller; import Entity.News; import Service.NewsService; import Util.Category; import javax.servlet.ServletException; im ...
分类:
Web程序 时间:
2020-06-24 23:58:49
阅读次数:
130
一、删除新闻 1.1 Controller层 1.2 Service层 二、新闻的修改 2.1 Controller层 2.2 Service层 三、新闻的添加 3.1 Controller层 3.2 Service层 四、新闻的查看 4.1 Controller层 4.2 Service层 五、效 ...
分类:
Web程序 时间:
2020-06-24 23:41:33
阅读次数:
68
MVC first appeared at the Web Layer of a Java Web project, it's a thinking. The Layers: web layer: com.truman.web/servlet/controller service layer: co ...
分类:
编程语言 时间:
2020-06-24 19:33:56
阅读次数:
59
说明 代码剥离自其他老哥的项目,项目地址——https://github.com/wangzaiplus/springboot/tree/wxw 再此记录下来以备不时之需 创建注解 /** * 在需要保证 接口防刷限流 的Controller的方法上使用此注解 */ @Target({Element ...
分类:
编程语言 时间:
2020-06-24 15:50:02
阅读次数:
55
服务器415错误 ssm框架的controller jsp页面 问题:页面出现415错误 原因:请求和响应类型不一致 分析: 出现了415错误一般是请求和响应的contentType类型不一致,可以F12看到浏览器的accept和contentType是不一致的,很多博客上都写着直接ajax设置co ...
分类:
其他好文 时间:
2020-06-24 13:45:26
阅读次数:
58
Spring中存在很多注解组合的情况,例如**@RestController** @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented @Controller @ResponseBody public @i ...
分类:
编程语言 时间:
2020-06-24 00:48:07
阅读次数:
78
/bin/目录下下 sh zkCli.sh 进入客户端目录下: 查看根目录 [zk: localhost:2181(CONNECTED) 11] ls /[cluster, controller, brokers, zookeeper, admin, isr_change_notification, ...
分类:
其他好文 时间:
2020-06-24 00:40:09
阅读次数:
206
情况如下: 为了方便统一公共类型模板变量的赋值,我们一般会定义个基类,这个基类会渲染一些子类都会用到的模板变量。 如: 定义一个前置方法,从session中取出uid,并查询渲染到模板变量 <?php namespace app\common\controller; use app\common\m ...
分类:
其他好文 时间:
2020-06-23 13:25:20
阅读次数:
112