How 1medx/shopws works
Project type and purpose
• This is a Spring Boot web application (full-stack in the sense that it exposes both REST endpoints and server-side rendered pages) whose sole purpose is to provide a REST API to manage products in an online shop (plus a simple Thymeleaf page to view product details).
File structure
• Top-level artifacts:
• pom.xml, mvnw(.cmd) → Maven build
• src/main/java/ma/fsr/shopws → Java codebase
– ShopwsApplication.java → Spring Boot entry point
– dao/ProductRepository.java → Spring Data JPA repository
– entities/Product.java → JPA entity
– exception/ProductNotFoundException.java → custom exception
– web/ProductController.java → REST & web controller
• src/main/resources/
– application.properties → configuration (datasource, JPA, server port, etc.)
– templates/product.html → Thymeleaf view
• src/test/java/… → basic application test
README
• Confirms: “Rest API for managing products in an online shop.” No further architectural notes, so we infer typical Spring Boot MVC layered architecture.