feat: Migrate eShopWCFService from WCF/SOAP to Spring Boot 3.5 REST API#7
Open
devin-ai-integration[bot] wants to merge 15 commits into
Open
feat: Migrate eShopWCFService from WCF/SOAP to Spring Boot 3.5 REST API#7devin-ai-integration[bot] wants to merge 15 commits into
devin-ai-integration[bot] wants to merge 15 commits into
Conversation
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…PUT path, fix /discounts path
…n CatalogServiceMock
… to handle overlaps
…event null FK overwrite
…ializationException
…ision in mock discounts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the
eShopModernizedNTier/src/eShopWCFService(.NET Framework 4.6.1 WCF SOAP service) to a Spring Boot 3.5 / Java 21 REST API ateShopModernizedNTier/src/eShopWCFService-SpringBoot/.What was migrated
[ServiceContract]/[OperationContract](SOAP)@RestControllerwith 10 REST/JSON endpointsDbContext+DbSet<T>JpaRepository<T, ID>(5 repositories)[DataContract]entity models (5)@Entityclasses with Jakarta ValidationWeb.config(WCF bindings, EF config)application.yml+ Spring profiles (dev/mock/prod)CatalogServiceMock(in-memory)@Profile("mock")service with preconfigured dataCatalogDBInitializer(EF seed)DataInitializer(ApplicationRunner)ApplicationModule)@Configuration+@ConditionalOnPropertyeclipse-temurin:21DockerfileREST API Endpoints (replacing WCF SOAP operations)
/api/catalog/itemsGetCatalogItems(brandFilter, typeFilter)/api/catalog/items/{id}FindCatalogItem(id)/api/catalog/itemsCreateCatalogItem(item)/api/catalog/items/{id}UpdateCatalogItem(item)/api/catalog/items/{id}RemoveCatalogItem(item)/api/catalog/brandsGetCatalogBrands()/api/catalog/typesGetCatalogTypes()/api/catalog/stockGetAvailableStock(date, itemId)/api/catalog/stockCreateAvailableStock(stock)/api/catalog/discountsGetDiscount(date)Architecture
model/,repository/,service/,controller/,config/Build status
mvn clean compile— passesmvn test— 3/3 passingMigration approach
Orchestrated via 3 parallel child Devin sessions:
Review & Testing Checklist for Human
cd eShopModernizedNTier/src/eShopWCFService-SpringBoot && ./mvnw spring-boot:run -Dspring-boot.run.profiles=dev— verify it starts on port 8080 and responds toGET /api/catalog/itemswith 12 seed catalog items-Dspring-boot.run.profiles=mockand confirm in-memory data is served correctlycatalogBrandId/catalogTypeId, PUT to update via/api/catalog/items/{id}, DELETE to remove, verify correct HTTP status codes (201, 200, 204) and that brand/type associations are persistedGET /api/catalog/stock?date=2017-09-20&catalogItemId=1should return 100;GET /api/catalog/discounts?date=2017-09-20should return the matching discountCatalogItem.javafields againstCatalogItem.csto ensure all properties (especiallyBigDecimalprice with precision 19,4) are correctly mappedNotes
eShopWCFService/is preserved unchanged — this adds a neweShopWCFService-SpringBoot/project alongside itmssql-jdbc) to match the original WCF service's database; dev/mock use H2 in-memoryCatalogItemHiLoGeneratorwas intentionally dropped — replaced by@GeneratedValue(strategy = IDENTITY)which is simpler for the REST API use caseCatalogServiceClient(WCF SOAP proxy) was dropped as REST clients don't need generated proxiesLink to Devin session: https://partner-workshops.devinenterprise.com/sessions/87d7557cd1c24b5aa9788e3cc3a9d666
Requested by: @mbatchelor81