Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bilalvdemir/springbootcrudexample
Spring Boot CRUD Example with MVC Pattern
https://github.com/bilalvdemir/springbootcrudexample
controller crud docker exception-handler exceptions formatter jpa logger mongodb regex-pattern restful-webservices spring-boot spring-mvc validator
Last synced: 18 days ago
JSON representation
Spring Boot CRUD Example with MVC Pattern
- Host: GitHub
- URL: https://github.com/bilalvdemir/springbootcrudexample
- Owner: bilalvdemir
- License: apache-2.0
- Created: 2018-09-20T10:46:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-22T13:55:42.000Z (about 3 years ago)
- Last Synced: 2024-10-29T23:07:49.977Z (2 months ago)
- Topics: controller, crud, docker, exception-handler, exceptions, formatter, jpa, logger, mongodb, regex-pattern, restful-webservices, spring-boot, spring-mvc, validator
- Language: Java
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Spring Boot CRUD Example MVC
Used simple pojo for showing MongDB CRUD operations and validations## Getting Started
This project includes:
- CREATE, Retrieve, Update, Delete Operations
- MVC Pattern
- Web Service
- Logger
- Validators and custom validator annotation
- Exceptions
- Regex Pattern Matchers
- Global exception handler
- MongoDB
- Message formatter
# Used Annotations- @Service
- @RestController
- @RequestMapping
- @ResponseBody
- @GetMapping
- @PostMapping
- @PutMapping
- @DeleteMapping
- @ControllerAdvice
- @ExceptionHandler
- @Id
- @NotNull
- @Pattern
- @Documented
- @Constraint
- @Target
- @Retention
- Custom Validator Annotation# Start Application With Docker
- Build Jar with Gradle
Linux:
```
gradle build
```
Windows:
```
./gradlew build
```
- Learn Docker version
```
docker -v
```
if docker dont installed:
* [Docker For Windows](https://docs.docker.com/docker-for-windows/install/) - Download Setup
- Build docker in root directory
```
docker build -f Dockerfile -t spring-boot-crud-example .
```
- Show docker builded images
```
docker images
```
- Run docker image with exposed port
```
docker run -p 8090:8090 spring-boot-crud-example
```## Contributing
Please read [CHANGELOG.md](https://github.com/bilalvdemir/SpringBootCRUDExample/blob/master/CHANGELOG.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Authors
* **Bilal Demir** - *Initial work* - [bilalvdemir](https://github.com/bilalvdemir)