-
Notifications
You must be signed in to change notification settings - Fork 1
SpringBoot to Quarkus Overview
rashansmith edited this page May 22, 2020
·
6 revisions
After migrating the AppDev Spring Rest Survey Group project, here are the overall changes needed:
POM
- Add Quarkus dependencies and configs added to pom.xml, remove Spring dependencies
Properties file
- Add application.properties file
Controller
- Add @ApplicationScoped, @RestController, @RegisterRestClient to class
- Add @Transactional to all request methods
Repository
- Implement PanacheRepository instead of JpaRepository
Models
- Extend PanacheEntity
Services
- Add @ApplicationScoped to class
- Add @Transactional to each method
- Add @QuarkusTest to each test class
- Add @Transactional to each class as needed (Controller Tests, Service Tests, Repository Tests)
- Use RestAssured instead of MockMVC for testing Controller
- replace verify() with asserts()
- Use @Inject and @InjectMock instead of @Mock and @InjectMocks
- Guide used for tests: https://github.com/quarkusio/quarkus/tree/master/integration-tests/hibernate-orm-panache