A comprehensive Spring Boot library providing standardized configurations and reusable components for enterprise applications.
ASH Core Library is a modular enterprise-grade library designed to streamline the development of Spring Boot applications by providing pre-configured components, standardized configurations, and reusable utilities. The library emphasizes maintainability, flexibility, and adherence to best practices.
- Security Configuration: Pre-configured security settings with flexible authentication and authorization
- Kafka Integration: Standardized messaging configuration with error handling and retry mechanisms
- Exception Handling: Centralized error management with consistent response structures
- Aspect-Oriented Programming: Reusable aspects for logging, monitoring, and transactions
- OpenAPI Documentation: Automated API documentation generation
- Object Mapping: Pre-configured MapStruct settings with common mapping patterns
- Custom Annotations: Simplified configuration through custom annotations
- Utility Classes: Common utilities for everyday development tasks
ash-core-lib/
├── bom/ # Bill of Materials for version management
├── base/ # Common functionality and core dependencies
├── core-config/ # Base configurations and properties
├── security/ # Authentication and authorization
├── messaging/ # Kafka configuration and components
├── error-handling/ # Exception handling and error responses
├── aspects/ # AOP components
├── documentation/ # OpenAPI configuration
├── mapper-config/ # MapStruct configuration
├── annotations/ # Custom annotations
└── utils/ # Utility classes
- Java 21 or higher
- Spring Boot 3.4.1 or higher
- Maven 3.8.1 or higher
Add the following to your pom.xml
:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.ashishbagdane.lib</groupId>
<artifactId>ash-core-lib-bom</artifactId>
<version>${ash-core-lib.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Then add specific modules as needed:
<dependencies>
<dependency>
<groupId>com.ashishbagdane.lib</groupId>
<artifactId>security</artifactId>
</dependency>
<dependency>
<groupId>com.ashishbagdane.lib</groupId>
<artifactId>messaging</artifactId>
</dependency>
<!-- Add other modules as needed -->
</dependencies>
- Add Dependencies: Include required modules in your project
- Configure Properties: Set up necessary properties in
application.yml
- Enable Features: Use provided annotations to enable specific features
Example configuration:
@SpringBootApplication
@EnableAshSecurity
@EnableAshMessaging
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
Each module has its own detailed documentation:
- BOM - Version management
- Base - Core functionality
- Security - Security configurations
- Messaging - Kafka integration
- Error Handling - Exception management
- Aspects - AOP components
- Documentation - OpenAPI setup
- Mapper Config - MapStruct configuration
- Annotations - Custom annotations
- Utils - Utility classes
The library uses Spring Boot's configuration mechanism. Common properties can be
set in application.yml
:
ash:
security:
enabled: true
jwt:
secret: your-secret-key
expiration: 86400000
messaging:
kafka:
bootstrap-servers: localhost:9092
consumer:
group-id: my-group
# Other module configurations
- Module Independence
- Use only required modules
- Follow module-specific guidelines
- Maintain loose coupling
- Configuration Management
- Override default configurations when needed
- Use environment-specific properties
- Document custom configurations
- Extension and Customization
- Extend base classes for custom behavior
- Use provided interfaces for implementations
- Follow the extension guidelines
We welcome contributions to ASH Core Library! Please read our CONTRIBUTING.md file for guidelines on how to contribute to this project, including:
- Code of Conduct
- Development Setup
- Contribution Process
- Pull Request Guidelines
- Coding Standards
- Testing Requirements
# Clone the repository
git clone https://github.com/AshishBagdane/ash-core-lib.git
# Build the project
mvn clean install
# Run tests
mvn test
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Create an issue for bug reports
- Start a discussion for questions
- Check documentation for guides
This project follows Calendar Versioning (CalVer):
- Format:
YYYY.MINOR.PATCH
- Example:
2025.1.0
- Ashish Bagdane - Initial work - AshishBagdane
- Spring Boot team for the excellent framework
- All contributors who have helped shape this library