dnno / spring-kotlin-jpa Goto Github PK
View Code? Open in Web Editor NEWSample code using Spring Boot and Kotlin to work with JPA
Sample code using Spring Boot and Kotlin to work with JPA
Hi,
I think I have a little Bug in your Git project to this article. In the project the class CreateCityDto contains the id field and the UpdateCityDto dose not. I think this classes are simply reversed.
Best Regards
Sebastian
Hi,
hope find you well with this cold call.
I am an author of mocking framework for Kotlin
I see you are using mockito-kotlin.
I just want you to be aware that there is solution that fully supports Kotlin and ask to try it in your new/current projects.
I can help you if you answer to this issue.
Thanks and please star it
First, thank you for writing the whole code. It was really enlightening to see how well-structured and educating it is. When I used your code as a basis for having my own persistent types, I stumbled upon several small issues in the code. Some are probably typos, but with some others I'm not sure.
CreateCityDto
uses var
, while UpdateCityDto
uses val
. Is that intentional?
The CreateCityDto
uses Hibernate annotations. This contradicts the purpose of the DTO to abstract from the persistence layer. Is that intentional?
In the UpdateCityDto
, how would I specify that I want to delete the description? Setting it to null
currently keeps the previous description.
In the JpaCityService
, you sometimes use cityId
and sometimes id
as parameter name. Is there a reason for this?
One of the log messages in JpaCityService
uses an uppercase City
, the others use the lowercase city
. Probably a typo.
In the JpaCityService
, you chose the variable name cityRepo
. In the corresponding test, you named it repository
. Any reason for the different names?
In the JpaCityServiceTest
, you declared var softly
even though val softyl
would be enough. Any specific reason for that?
The JpaCityServiceTest.'updateCity' should update existing values
test checks the updatedAt
property twice.
The method CityController.addCity
has a CityDto
as parameter, which violates the separation of layers. This should rather be a CityResource
.
In log4j2.yml
, the word Configutation
looks like a typo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.