This project provides an authentication service for microservices, built using Java Spring Boot with Docker and Jenkins integration. It have asynchronous messaging enabled over apache kafka when login is completed.
Swagger available at URL: http://localhost:9003/swagger-ui/index.html
- User Authentication: Secure user authentication using JWT.
- User Management: APIs for user registr ation and management.
- Security: Implements best practices for security.
- Global exception handling: Best practice for handling global exceptions with api response
- Registry Registration: Register application to eureka registry.
- Asynchronous messaging: Producing Apache Kafka messages after login success.
- Java
- Spring Boot
- MySQL
- JWT security
- Apache kafka
- Docker
- Jenkins
- Java 17
- MySQL
- Apache Kafka
- Microservices registry Github Porject
- Docker
- Maven
-
Clone the repository:
git clone https://github.com/bhupendrasambare/microservices-authenticate-service.git cd microservices-authenticate-service
-
Update the
application.yaml
properties with your custom settings:custom: server-ip: 192.168.29.226 spring: kafka: bootstrap-servers: ${custom.server-ip}:9092 datasource: url: jdbc:mysql://${custom.server-ip}:3306/microservices?allowPublicKeyRetrieval=true driver-class-name: com.mysql.cj.jdbc.Driver username: root password: password
-
Build the project using Maven:
./mvnw clean install
-
Run the application:
java -jar target/microservices-authenticate-service-0.0.1-SNAPSHOT.jar
-
Build the Docker image:
docker build -t microservices-authenticate-service .
-
Run the Docker container:
docker run -d -p 9003:9003 microservices-authenticate-service
The project includes a Jenkinsfile
for CI/CD integration. Ensure Jenkins is set up with Docker and Maven installed.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or suggestions, please contact Bhupendra Sambare.
This project is part of Bhupendra Sambare's repositories on GitHub.