Spring module to be used as dependency that pre-configures and initializes commonly used. This would same boilerplate configuration as well as unify the logging mechanisim, making it easiser for log monitoring tools.
- API and Service Logging
- uses AOP to configure MDC context traceable map and produce logs across pointcuts for
@Controller
and@Service
- uses AOP to configure MDC context traceable map and produce logs across pointcuts for
- Thread Pool
- Configure thread pool for
@Async
processes using the provided properties, otherwise falls back to pre-configured values.
- Configure thread pool for
AbstractClientRequestService
- "Decorator" for internal request service
- Handles request headers authentication
- Validates the request and response bodies, using Bean Validation
- Sets MDC context map for AOP logging
- Email service +
- API Authorization
- Secures API endpoints using
<ROLE>,<URI>
pair list. - Requests with valid JWT tokens gets access to their
<ROLE>
endpoints.
- Secures API endpoints using
- Health Indicators and schduled reports
- Plugins the Spring Auctator
- Clone this repo.
mvn install
Add <dependency>
into pom.xml
of the disered app:
<dependency>
<groupId>yoga1290</groupId>
<artifactId>core-system</artifactId>
<version>1.0.0</version>
</dependency>
<!-- TBA: will add <repository> later on; gonna make use of github maven registry & github actions -->
To scan the required components/package, you will need to add this entrypoint class:
import yoga1290.commons.ImportCommons;
//...
@SpringBootApplication
@Import({ ImportCommons.class})
//..
- Spring | Custom Logs Configuration
- Baeldung | Guide to Spring Email
- Your First Full Stack Application with Angular and Spring Boot
- DZone | Setting Up MDC Context With AOP in Spring Boot Applications
- Mkyong | package javax.validation.constraints does not exist
- Spring | Spring Security without the WebSecurityConfigurerAdapter