-
Notifications
You must be signed in to change notification settings - Fork 11
Release 0.2.0 #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release 0.2.0 #10
Conversation
Introduce a Contributor Code of Conduct to outline expected behavior and reporting procedures, fostering an open and welcoming community. Adapted from the Contributor Covenant v1.3.0.
Expanded the README to include project purpose, module descriptions, setup instructions, build steps, contribution guidelines, and documentation links. Added badges for build status and documentation hosts to improve project visibility and onboarding.
Introduces RedisCommandReplicatedEventTest to verify the getDomain and getSourceEvent methods of RedisCommandReplicatedEvent.
The redundant Maven Central version badge was removed from the README to reduce clutter and avoid duplication.
Corrected the formatting of the zread badge in the README to ensure proper display and alignment with other badges.
Included a Maven Central badge to display the latest published version of the microsphere-gateway artifact, improving project visibility and providing users with quick access to version information.
Documented the introduction version of several Redis command interface constants using @SInCE tags for better clarity on their availability in Spring Data Redis.
Changed visibility of default property value constants in KafkaConsumerRedisReplicatorConfiguration from private to package-private to allow direct access in tests. Added a new test method in KafkaConsumerRedisReplicatorConfigurationTest to verify the values of these constants and related configuration constants.
Corrected the compatibility range for branch 0.1.x to start from Spring Data Redis 2.1.0 instead of 2.0.0.
Moved <properties> section above <dependencies> and removed unused <classPath> property. Reformatted plugin <argument> for better readability.
Renamed 'docUtils' to 'javaFileObjects' for clarity in SpringDataRedisMetadataGenerator and updated its usage in the DocumentationTask call.
Changed the Maven badge in README.md to reference microsphere-redis instead of microsphere-gateway for accuracy.
Imported DefaultRedisConfig and included it in the @ContextConfiguration classes for KafkaRedisReplicatorModuleInitializerIntegrationTest to ensure proper Redis configuration during integration testing.
Adjusted the order of import statements for better organization and consistency in RedisMethodContext.java.
Moved the import of io.microsphere.redis.metadata.Parameter to group it with other imports for better organization and readability.
Included DefaultRedisConfig in the @ContextConfiguration classes for RedisCommandReplicatorIntegrationTest to ensure proper Redis configuration during integration testing.
Deleted static @bean methods for RedisTemplate, StringRedisTemplate, and RedisConnectionFactory from AbstractRedisReplicatorTest. These definitions are likely unnecessary for the test context or have been moved elsewhere.
Updated the resolvableType method to use ResolvableType.forClass instead of forType for obtaining the generic type. This change improves type resolution for the AbstractSerializer class.
Deleted the trailing newline at the end of BoundarySerializer.java to conform to file formatting standards.
Deleted the trailing newline at the end of ByteArraySerializer.java to conform to file formatting standards.
Deleted the trailing newline at the end of DoubleSerializer.java to conform to file formatting standards.
Deleted the trailing newline at the end of GeoLocationSerializer.java to conform to file formatting standards.
Deleted the trailing newline at the end of IntegerSerializer.java to conform to file formatting standards.
Deleted the trailing newline at the end of LongSerializer.java to conform to file formatting standards.
Deleted the trailing newline at the end of PointSerializer.java to conform to file formatting standards.
Deleted the trailing newline at the end of RangeSerializer.java to conform to file formatting standards.
Deleted the trailing newline at the end of RedisZSetCommandsRangeSerializer.java to conform to file formatting standards.
Deleted an unnecessary blank line at the end of ShortSerializer.java to improve code formatting.
Deleted the trailing newline at the end of WeightsSerializer.java to conform to file formatting standards.
Replaced references to 'delegate' with 'this.delegate' in HoldingValueRedisSerializerWrapper for clarity and consistency.
Introduces the RangeModel class to adapt between RedisZSetCommands.Range and Spring's Range, supporting serialization and deserialization. This utility facilitates interoperability and externalization of range objects.
Simplifies RangeSerializer by delegating Range to RangeModel conversion to static methods. Removes manual extraction and assignment of Range bounds, improving code maintainability and readability.
Replaces the use of range.toRange() with RangeModel.from(range) in RedisZSetCommandsRangeSerializer to improve serialization consistency.
Deleted the trailing newline at the end of EnableRedisInterceptorTest.java to conform to file formatting standards.
Replaced usage of 'integer' with 'index' variable for clarity and consistency in assertions within testInitializeParameters. This improves readability and avoids potential confusion in parameter handling.
Annotated RedisTemplate and StringRedisTemplate fields with @qualifier to ensure correct bean injection in AbstractRedisTest. This improves reliability when multiple beans of the same type exist.
Introduced a new field 'parameterNames' with corresponding getter and setter methods in the MethodMetadata class. Updated equals, toString, and related logic to include parameterNames for more detailed method metadata representation.
Extended MethodMetadataTest to include assertions and setup for the parameterNames property, ensuring correct behavior for equality and getter/setter methods.
Introduces collection and storage of method parameter names in the generated metadata for Spring Data Redis command methods. Refactors parameter type resolution and updates the metadata map to include both parameter names and types.
Added explicit parameterNames for all method entries in spring-data-redis-metadata.yaml to improve clarity and support for reflection or code generation. This enhances documentation and tooling around Redis command interfaces.
Updated Parameter and ParameterMetadata toString methods to use symbol constants for formatting. Refactored SpringRedisMetadataRepository to remove Spring's ParameterNameDiscoverer and use method metadata for parameter names, simplifying parameter metadata construction.
Replaces direct call to buildParameterMetadataList with a new getParameterMetadataList method that considers parameter names from MethodMetadata. Updates method to use redisCommandMethod when parameter names are unavailable, improving flexibility and correctness in parameter metadata construction.
Introduced a unit test to verify that getParameterMetadataList returns the expected parameter metadata for Redis command methods by comparing it with buildParameterMetadataList.
🤖 Augment PR SummarySummary: This PR prepares the Changes:
Technical Notes: Parameter names are added as an additive metadata field; method indexing continues to rely on interface name + method name + parameter types. 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| int result = hash(index, interfaceName, methodName, write); | ||
| result = 31 * result + Arrays.hashCode(parameterTypes); | ||
| result = 31 * result + Arrays.hashCode(commands); | ||
| int result = hash(this.index, this.interfaceName, this.methodName, this.write); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| cache(methodInfoCache, redisCommandMethod, methodInfo); | ||
| cache(methodInfoCache, methodId, methodInfo); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When parameterNames is present, the code assumes its length matches parameterTypes.length; if it doesn’t, later indexing (parameterNames[i]) will throw ArrayIndexOutOfBoundsException. Consider guarding for length mismatches and falling back to buildParameterMetadataList(redisCommandMethod) for robustness.
🤖 Was this useful? React with 👍 or 👎
README.md
Outdated
|
|
||
| ## License | ||
|
|
||
| The Microsphere Spring is released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the project name from 'Microsphere Spring' to 'Microsphere Redis' in the license section to accurately reflect the repository.
|



This pull request introduces several improvements and enhancements to the Microsphere Redis project, focusing on better metadata handling, improved documentation, and minor code consistency updates. The most significant changes are the addition of parameter name support in method metadata, updates to the test suite to reflect these changes, and enhancements to project documentation and configuration.
Enhancements to Metadata Handling:
parameterNamesfield to theMethodMetadataclass, including corresponding getter/setter methods, updates toequals,hashCode, andtoString, and integration into related tests. This allows the framework to capture and utilize method parameter names in addition to types for Redis command metadata. [1] [2] [3] [4] [5] [6]SpringDataRedisMetadataGenerationDoclet) to introduce a new metadata key for method parameter names, laying the groundwork for generating and persisting this information.ParameterandParameterMetadataclasses to use symbolic constants for formatting, ensuring consistency across metadata-related classes. [1] [2] [3] [4]Documentation and Project Structure:
README.mdto provide a clear project overview, module descriptions, getting started instructions, build steps, contribution guidelines, and links to documentation resources.CODE_OF_CONDUCT.mdfile to establish community guidelines and foster an open, welcoming environment for contributors.Build Configuration:
microsphere-redis-generator/pom.xmlby moving thesourcePathproperty to the correct section and removing redundant properties, improving Maven configuration hygiene. [1] [2]Codebase Maintenance:
These changes collectively enhance the maintainability, usability, and extensibility of the Microsphere Redis project, particularly in how method metadata is captured and leveraged for advanced Redis integration scenarios.