![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring boot
文章平均质量分 77
birdmain
这个作者很懒,什么都没留下…
展开
-
spring boot json和xml,xhtml转换器选择
当我们的地址以json和xml结尾时,spring boot会选择对应的转换器来进行转换比如,输入 http://ip:port/hello.json 结果返回json格式的{"code":100,"msg":"hello"} http://ip:port/hello.xml 结果返回xml格式的<xml> <code>100<...原创 2018-01-29 11:14:01 · 601 阅读 · 0 评论 -
RequestMapping注解中consumes与produces的区别
一直没搞懂RequestMapping中consumes和produces的区别今天看了下源码,总结一下说到这两个参数,不得不先回顾一下HTTP协议Header中的两个东西ContentType 和Accept在Request中ContentType 用来告诉服务器当前发送的数据是什么格式Accept 用来告诉服务器,客户端能认识哪些格式,最好返回这些格式...原创 2018-02-02 10:01:13 · 10031 阅读 · 0 评论 -
Spring Boot 配置与jar分离的一种实现方式
最近项目中遇到一个问题,就是要把Spring Boot 的jar包与配置分离(不仅仅是application.xml)咱们费活少说,上maven配置 org.apache.maven.plugins maven-jar-plugin ...原创 2018-05-28 12:14:15 · 191 阅读 · 0 评论