Milestone
With SDK [0.6.0-RELEASE] and plugin [0.2.0]
After the SDK and plugin upgrade on February 22, 2024, the migration process was triggered. If you are using ApiHug after that date, you won’t encounter any issues, and there is no need to refer to this document.
⚠️ This is an incompatible change, Both the SDK and IDE plugin not compatible with previous version.
⚠️ Upgrade the Spring boot to 3.2+
and if any incompatible 3rd party libs(Cloud etc.)
😆 Guide:
google.protobuf.BoolValue
-> hope.common.BoolType
, less code, more straightforward. 3 kinds Booleanauthorization_struct
—> rbac
make it more human friendly: RBAC rbac = 2;
hope.common.BoolType blank = 49;
for the String
specific field
empty
vs blank
, blank more for the string field, string field may not empty, but may be blank, as it include no qualify character, like space, tab, etc.Upgrade SDK+IDE Version:
{PROJECT}/gradle/libs.versions.toml
apihug = "OLD_VERSION"
-> 0.6.0-RELEASE
+0.2.0
+1.google.protobuf.BoolValue
-> hope.common.BoolType
🏁 find all the broken like:
empty: {
value: false
};
Change TO:
empty: FALSE;
2. authorization_struct
—> rbac
🏁 find all the broken like:
authorization_struct: {
authorities: "PLATFORM_MEMBER_OPERATE";
combinator: OR;
predefined_role_checker: PLATFORM_MANAGER
}
}
Change TO:
rbac: {
authorities: "PLATFORM_MEMBER_OPERATE";
combinator: OR;
predefined_role_checker: PLATFORM_MANAGER
}
}
🥳🥳🥳 all done!
3.2+
factoryBeanObjectType issue Invalid value type for attribute ‘factoryBeanObjectType’: java.lang.String:
java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60)
Caused by: java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getTypeForFactoryBeanFromAttributes(FactoryBeanRegistrySupport.java:86)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:837)
...
... 15 common frames omitted
MappingJdbcConverter issue;
at hope.common.spring.data.persistence.config.HopeAbstractJdbcConfiguration.jdbcConverter(HopeAbstractJdbcConfiguration.java:133)
...
Caused by: java.lang.ClassNotFoundException: org.springframework.data.jdbc.core.convert.MappingJdbcConverter
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 66 common frames omitted