Easter79 Easter79
4年前
tp5 统一返回json格式
控制器调用publicfunctionjson(){if(request()isPost()){returnjsonData(1,'转换成功',数据(可不填));    }   }公共方法/返回统一格
Easter79 Easter79
4年前
SpringBoot系列——Jackson序列化
  前言  SpringBoot提供了与三个JSON映射库的集成:GsonJacksonJSONB  Jackson是首选的默认库。  官网介绍:  https://docs.spring.io/springboot/docs/2.1.6.RELEASE/reference/html/boot
Stella981 Stella981
4年前
Json转换神器之Google Gson的使用
这几天,因为项目的需要,接触了Google的Gson库,发现这个东西很好用,遂记下简单的笔记,供以后参考。至于Gson是干什么的,有什么优点,请各位同学自行百度。1\.下载Gson拷贝到项目的lib文件夹中,并将其加入到buildPath中。使用maven的同学,直接在pom中加入以下依赖即可:<dependenc
Stella981 Stella981
4年前
SpringBoot系列——Jackson序列化
  前言  SpringBoot提供了与三个JSON映射库的集成:GsonJacksonJSONB  Jackson是首选的默认库。  官网介绍:  https://docs.spring.io/springboot/docs/2.1.6.RELEASE/reference/html/boot
Easter79 Easter79
4年前
SpringBoot配置Swagger实例(POST接收json参数)
工程目录结构:!(https://oscimg.oschina.net/oscnet/207b6df22d35c70fd7ef5ba084e9e0eff60.png)首先,引入jar包,只需要以下两个即可<dependency<groupIdio.springfox</groupId<
Wesley13 Wesley13
4年前
JAVA项目实战
本节分享高德地图API实现web服务端导航和定位等功能packagecom.example.combat.gaodemapUtils;importcn.hutool.core.io.FileUtil;importcom.alibaba.fastjson.JSON;importcom.alibaba.
Wesley13 Wesley13
4年前
Android Service学习之IntentService 深入分析
官方的解释是:IntentServiceisabaseclassfor Servicesthathandleasynchronousrequests(expressedas Intents)ondemand.Clientssendrequeststhrough android.content.Context.star
Stella981 Stella981
4年前
SpringBoot配置Swagger实例(POST接收json参数)
工程目录结构:!(https://oscimg.oschina.net/oscnet/207b6df22d35c70fd7ef5ba084e9e0eff60.png)首先,引入jar包,只需要以下两个即可<dependency<groupIdio.springfox</groupId<
Easter79 Easter79
4年前
Spring源码解析(三)BeanDefinition的载入、解析和注册
  通过上一篇源码的分析已经完成了BeanDefinition资源文件的定位,本篇继续分析BeanDefinition资源文件的载入和解析。AbstractBeanDefinitionReader的loadBeanDefinitions(Stringlocation,Set<ResouceactualResouces)方法完成定位,紧接着调用loa
Stella981 Stella981
4年前
OpenCV4Android&JNI学习中遇到的问题及一些小结
   想在Android手机上实现人脸检测,于是搭建一个OpenCV4Android的环境。具体参考如下网址:http://my.eoe.cn/sandking/archive/2999.html(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Fmy.eoe.cn%2Fsandking%