It means the specified logical properties in will take part in JSON serialization but not in deserialization. When we pass true to allowGetters element, the getters will be allowed for the specified logical properties. The element value specifies name of properties to ignore. It means the union of logical properties ignored by and are considered to be ignored in JSON serialization and has elements that are allowGetters, allowSetters, ignoreUnknown and value. If other logical properties such as bookId has been annotated with then all these logical properties will be ignored in JSON serialization and deserialization. So these logical properties will not take part in JSON serialization and deserialization.
Jackson is a popular and very efficient JAVA library used to map or serialize JAVA objects to JSON and vice versa. Although that is a very familiar term with the people involved in the coding world, it is less known. The logical properties bookName and bookCategory has been specified in annotation. One of its features is the Jackson annotations. Import class Book String String String category The JsonCreator annotation is useful in situations where the JsonSetter annotation cannot be used.
Mapper-locations: classpath*:mapper/**/*Mapper.xml The Jackson annotation JsonCreator is used to tell Jackson that the Java object has a constructor (a 'creator') which can match the fields of a JSON object to the fields of the Java object. Databind (jackson-databind) implements data-binding (and object serialization) support on streaming package. Url: jdbc:mysql://localhost:3306/test-demo?zeroDateTimeBehavior=convertToNull&characterEncoding=utf8&useSSL=false&serverTimezone=UTCĭriver-class-name: .jdbc.Driver Jackson is a suite of data-processing tools for Java comprising of three components: Annotations (jackson-annotations) involves fashionable Jackson annotations. This is an example of my integration Mainly used springboot + swagger + mybatisplus+jwt+mysql
Token If we don't save their information, Make their identity information into a voucher according to the agreement with them, Our server can verify the authenticity of this certificate, Then there is no such pressure ( Because it can be decrypted, so you know )
, Login complete, We assign it an identification message, Every request requires them to give us their identity information, We can know who operated it !Ĭonventional Session, We all know that we save it in memory, Small users can run perfectly, But the number of users is huge, The number of online people is huge, That's a big burden for servers, So how to solve it ? Then we need to talk about token Certification and traditional session authentication ,http Protocol itself is a stateless protocol, How can we guarantee that we allow people to operate ?įirst of all, we need to establish our identity, For example, login. If it is the form of front and rear end separation, Back end only out api, How can you guarantee that someone you allow will visit you api Well ? It's impossible for everyone to respond ? When you do data operations, How does the backend know that you are the one who operated it instead of others, commonly web You are definitely not using the service alone ? static JsonInclude.
This information can be verified and trusted, Because it's digitally signed. valueOf ( String name) Returns the enum constant of this type with the specified name. JSON Web Token (JWT) It's an open standard (RFC 7519), It defines a compact 、 The self-contained way, Used as a JSON Objects transmit information securely between parties.