class AbstractGeneralConfigServiceImpl<T> implements GeneralConfigService<T> {
    protected final GeneralConfigDao generalConfigDao;
    protected final ObjectMapper objectMapper;

    /**
     * 构造方法，传入GeneralConfigDao、ObjectMapper和type。
     * <p>Constructor, passing in GeneralConfigDao, ObjectMapper and type.</p>
     * @param generalConfigDao 配置Dao对象
     * @param objectMapper     JSON工具类对象
     */
    protected AbstractGeneralConfigServiceImpl(GeneralConfigDao generalConfigDao, ObjectMapper objectMapper) {
        this.generalConfigDao = generalConfigDao;
        this.objectMapper = objectMapper;
    }

    /**
     * 保存配置。
     * <p>Save a configuration.</p>
     * @param config 需要保存的配置对象
     */
    @Transactional(rollbackFor = Exception.class)
    @Override
    public void saveConfig(T config) {<FILL_FUNCTION_BODY>}

    /**
     * 获取配置。
     * <p>Get a configuration.</p>
     * @return 查询到的配置对象
     */
    @Override
    public T getConfig() {
        GeneralConfig generalConfig = generalConfigDao.findByType(type());
        if (generalConfig == null) {
            return null;
        }
        try {
            return objectMapper.readValue(generalConfig.getContent(), getTypeReference());
        } catch (JsonProcessingException e) {
            throw new IllegalArgumentException("Get configuration failed: " + e.getMessage());
        }
    }

    /**
     * 获取配置类型的TypeReference对象。
     * <p>Get TypeReference object of configuration type.</p>
     * @return 配置类型的TypeReference对象
     */
    protected abstract TypeReference<T> getTypeReference();

}

        try {
            String contentJson = objectMapper.writeValueAsString(config);

            GeneralConfig generalConfig2Save = GeneralConfig.builder()
                    .type(type())
                    .content(contentJson)
                    .build();
            generalConfigDao.save(generalConfig2Save);
            log.info("配置保存成功|Configuration saved successfully");
            handler(getConfig());
        } catch (JsonProcessingException e) {
            throw new IllegalArgumentException("Configuration saved failed: " + e.getMessage());
        }
    
<no_super_class>