in which case the OP would have gotten a Nullpointer, which wasn't shared. A bit more detail would be helpful but, certainly, not autowiring that dependency would cause problems.
When we are creating a Spring web application, the business logic should be in a separate layer as a Service. So we have Controller, Service, Repositories, and Models. Please check this github.com/raviyasas/spring-boot-hibernate-demo.git
It is better if you can write your own code like mine or you can use my one. It is the best practice to write code in mvc pattern. That is why I mentioned it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You need to autowire the repository like below
in which case the OP would have gotten a Nullpointer, which wasn't shared. A bit more detail would be helpful but, certainly, not autowiring that dependency would cause problems.
github.com/arotto8719/app
Trying But I’m having trouble uploading photos. Any ideas?
I have no idea what a null pointer is
I already have that on top of home controller
github.com/arotto8719/app
The whole code is on here.
When we are creating a Spring web application, the business logic should be in a separate layer as a Service. So we have Controller, Service, Repositories, and Models. Please check this github.com/raviyasas/spring-boot-hibernate-demo.git
I have all that on there but I need to know what to put in the exact lines so I can save and edited item.
Something besides the Post or whatever.
I have artifact repository.
Am I supposed to copy and paste what you have or do I have to make mine similar to yours?
It is better if you can write your own code like mine or you can use my one. It is the best practice to write code in mvc pattern. That is why I mentioned it.