Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rburgst/springbootgeda
sample for demonstrating classcastexception with spring boot and GEDA mapper.
https://github.com/rburgst/springbootgeda
Last synced: 2 days ago
JSON representation
sample for demonstrating classcastexception with spring boot and GEDA mapper.
- Host: GitHub
- URL: https://github.com/rburgst/springbootgeda
- Owner: rburgst
- Created: 2016-03-22T05:32:25.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-23T05:50:19.000Z (almost 9 years ago)
- Last Synced: 2024-11-08T17:53:07.100Z (about 2 months ago)
- Language: Java
- Size: 52.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example application for spring boot and GEDA
This project shows an example where mapping DTOs with GEDA caused CastExceptions (see Update below):
java.lang.ClassCastException: com.example.UserEntity cannot be cast to com.example.UserEntity
at com.example.UserEntityDataReaderMgetIdIDjavassist.read(UserEntityDataReaderMgetIdIDjavassist.java) ~[geda.core-3.1.0.jar:na]
at com.inspiresoftware.lib.dto.geda.assembler.DataPipe.writeFromEntityToDto(DataPipe.java:144) ~[geda.core-3.1.0.jar:na]
at com.inspiresoftware.lib.dto.geda.assembler.DTOtoEntityAssemblerImpl.assembleDto(DTOtoEntityAssemblerImpl.java:240) ~[geda.core-3.1.0.jar:na]
at com.inspiresoftware.lib.dto.geda.assembler.DTOtoEntityAssemblerImpl.assembleDtos(DTOtoEntityAssemblerImpl.java:262) ~[geda.core-3.1.0.jar:na]
at com.example.UserController.getAllUsers(DemoApplication.java:60) ~[main/:na]
## UpdateThe issue was fixed by specifying a specific classloader when creating the assembler in the constructor of
`UserController`.
## How to run./gradlew bootRun
Then open your web browser and point it to [http://localhost:8080/user](http://localhost:8080/user).