赞
踩
其它面试题(springboot、mybatis、并发、java中高级面试总结等)
<project xmlns=“http://maven.apache.org/POM/4.0.0” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=“http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd”>
4.0.0
jacksondemo
com.bolingcavalry
1.0-SNAPSHOT
…/pom.xml
com.bolingcavalry
springbootproperties
0.0.1-SNAPSHOT
springbootproperties
Demo project for Spring Boot
<java.version>1.8</java.version>
org.springframework.boot
spring-boot-dependencies
2.3.3.RELEASE
pom
import
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-test
test
org.junit.vintage
junit-vintage-engine
io.springfox
springfox-swagger2
io.springfox
springfox-swagger-ui
org.springframework.boot
spring-boot-maven-plugin
package com.bolingcavalry.springbootproperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringbootpropertiesApplication {
public static void main(String[] args) {
SpringApplication.run(SpringbootpropertiesApplication.class, args);
}
}
package com.bolingcavalry.springbootproperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.service.Tag;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.tags(new Tag(“JsonPropertySerializationController”, “JsonProperty相关测试”))
.select()
// 当前包路径
.apis(RequestHandlerSelectors.basePackage(“com.bolingcavalry.springbootproperties.controller”))
.paths(PathSelectors.any())
.build();
}
//构建 api文档的详细信息函数,注意这里的注解引用的是哪个
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
//页面标题
.title(“SpringBoot整合Jackson(基于配置文件)”)
//创建人
.contact(new Contact(“程序员欣宸”, “https://github.com/zq2599/blog_demos”, “zq2599@gmail.com”))
//版本号
.version(“1.0”)
//描述
.description(“API 描述”)
.build();
}
}
package com.bolingcavalry.springbootproperties.bean;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
@ApiModel(description = “JsonProperty注解测试类”)
public class Test {
@ApiModelProperty(value = “私有成员变量”)
@JsonProperty(value = “json_field0”, index = 1)
private Date field0 = new Date();
public void setField0(Date field0) {
this.field0 = field0;
}
@ApiModelProperty(value = “来自get方法的字符串”)
@JsonProperty(value = “json_field1”, index = 0)
public String getField1() {
return “111”;
}
@Override
public String toString() {
return “Test{” +
“field0=” + field0 +
‘}’;
}
}
package com.bolingcavalry.springbootproperties.controller;
import com.bolingcavalry.springbootproperties.bean.Test;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
这份面试题几乎包含了他在一年内遇到的所有面试题以及答案,甚至包括面试中的细节对话以及语录,可谓是细节到极致,甚至简历优化和怎么投简历更容易得到面试机会也包括在内!也包括教你怎么去获得一些大厂,比如阿里,腾讯的内推名额!
某位名人说过成功是靠99%的汗水和1%的机遇得到的,而你想获得那1%的机遇你首先就得付出99%的汗水!你只有朝着你的目标一步一步坚持不懈的走下去你才能有机会获得成功!
成功只会留给那些有准备的人!
对话以及语录,可谓是细节到极致,甚至简历优化和怎么投简历更容易得到面试机会也包括在内!也包括教你怎么去获得一些大厂,比如阿里,腾讯的内推名额!
某位名人说过成功是靠99%的汗水和1%的机遇得到的,而你想获得那1%的机遇你首先就得付出99%的汗水!你只有朝着你的目标一步一步坚持不懈的走下去你才能有机会获得成功!
成功只会留给那些有准备的人!
[外链图片转存中…(img-1Newgqvr-1715369942893)]
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。