public static <T> Class<? extends T> convertStringToClassType(String className, Class<? extends T> targetClassType) {
        try {
            Class<?> clazz = Class.forName(className);
            if (!targetClassType.isAssignableFrom(clazz)){
                throw new ConfigParseException("Class " + className + " is not a subclass of " + targetClassType.getName());
            }
            return (Class<? extends T>) clazz;
        } catch (ClassNotFoundException e) {
            throw new ConfigParseException("Class not found: " + className, e);
        }
    }
@Test
    public void testConvertStringToClass() {
        Class<? extends Throwable> clazz = ClassParseUtil.convertStringToClassType("java.lang.Exception", Throwable.class);

        Assertions.assertThat(clazz).isEqualTo(Exception.class);
    }