All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.feingto.cloud.domain.oauth2.converters.OAuth2AccessTokenPersistenceConverters Maven / Gradle / Ivy

There is a newer version: 2.3.5.RELEASE
Show newest version
package com.feingto.cloud.domain.oauth2.converters;

import com.feingto.cloud.kit.json.JSON;
import org.springframework.security.oauth2.common.OAuth2AccessToken;

import javax.persistence.AttributeConverter;

/**
 * OAuth2AccessToken 持久层转换
 *
 * @author longfei
 */
public class OAuth2AccessTokenPersistenceConverters implements AttributeConverter {
    @Override
    public String convertToDatabaseColumn(OAuth2AccessToken attribute) {
        return JSON.obj2json(attribute);
    }

    @Override
    public OAuth2AccessToken convertToEntityAttribute(String data) {
        return JSON.json2pojo(data, OAuth2AccessToken.class);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy