2 Star 18 Fork 3

思伟 / fastjson-spring-boot-starter

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

自制spring boot starter for fastjson

GitHub:https://github.com/JoeyBling/fastjson-spring-boot-starter

码云:https://gitee.com/zhousiwei/fastjson-spring-boot-starter

欢迎使用和Star支持,如使用过程中碰到问题,可以提出Issue,我会尽力完善

简介

该项目主要利用Spring Boot的自动化配置特性来实现快速的将fastjon引入spring boot使用fastjson解析框架。

小工具一枚,欢迎使用和Star支持,如使用过程中碰到问题,可以提出Issue,我会尽力完善该Starter

版本基础

  • Spring Boot:1.5.x
  • FastJson:1.2.15

如何使用

在该项目的帮助下,我们的Spring Boot可以轻松的引入fastjson,主需要做下面两个步骤:

  • pom.xml中引入依赖:

当前最新版本 10.10.10.RELEASE

  • 由于spring-boot-starter-parent版本更新问题 spring-boot-starter-parent 2.0.0.RELEASE之前使用
<dependency>
	<groupId>io.gitee.zhousiwei</groupId>
	<artifactId>fastjson-spring-boot-starter</artifactId>
	<version>8.8.8.RELEASE</version>
</dependency>
  • spring-boot-starter-parent 2.0.0.RELEASE之后使用
<dependency>
	<groupId>io.gitee.zhousiwei</groupId>
	<artifactId>fastjson-spring-boot-starter</artifactId>
	<version>10.10.10.RELEASE</version>
</dependency>

默认情况下就能在springboot项目中使用fastjson

参数配置

更细致的配置内容参考如下:

配置示例

fastjson:
  enabled: true
  media-type: application/json;charset=UTF-8
  date-format: yyyy-MM-dd HH:mm:ss

配置说明

默认配置

fastjson:
  enabled: true  # 是否启用fastjson(默认为:true)
  media-type: application/json;charset=UTF-8  # 媒体类型(默认为:application/json;charset=UTF-8)
  date-format: yyyy-MM-dd HH:mm:ss  # 日期格式(默认为:yyyy-MM-dd HH:mm:ss)

8.8.8.RELEASE新增:date-format属性,且配置成功会打印控制台信息:starter for fastJson-----fastJson init success.

贡献者

About

Cancel

Releases

No release

fastjson-spring-boot-starter

Contributors

All

Activities

Load More
can not load any more
Java
1
https://gitee.com/zhousiwei/fastjson-spring-boot-starter.git
git@gitee.com:zhousiwei/fastjson-spring-boot-starter.git
zhousiwei
fastjson-spring-boot-starter
fastjson-spring-boot-starter
master

Search

E71a60c3 8189591 Df7b7c6b 8189591