Where is the problem?
How can we design this?
Why do we not simply push all logics into service and rather make it as class than having as interface?
This works when we create jersey project right ?
Spring mvc don’t support json?
But we can’t convert form data directly to json in spring mvc right?


User

Role

UserRepo

CustomUserDetails

CustomUserDetails

UserDao

Persistance1

Persistance2
Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘myController’: Unsatisfied dependency expressed through field ‘userDao’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userDAOclass’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sessionFactory’ defined in class path resource [es/tmarcos/PrimerProyecto/config/PersistenceConfigManagement.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException: Cannot read the array length because “<local1>” is null
Hello tell me
It supports
User roles table name seems to be different at diff. places.
But we can’t convert form data directly to json in spring mvc right?
I am not unable to recall but there is some interface or something which convert objects to json format
If you’re asking about sending/receiving json formatted values from/to REST services in MVC, you can use the annotaitons: @Produces({application/json}) or @Consumes({application/json}) on the GET/POST methods, respectively.
If you’re asking about consuming json from the MVC services (i.e. converting/mapping the json output to Java objects), you can use libraries like Jackson.
I am using spring boot thymeleaf to create a webapp, and need to add 2 button’s with functionalities for “shut-down” and “restart”, from the html button itself.
How can we design this?
If you’re asking about consuming json from the MVC services (i.e. converting/mapping the json output to Java objects), you can use libraries like Jackson.
Spring mvc as consumer and spring rest as provider so I think producer and consumer annotations will help, will try. Thanks
we use service and serviceImpl both.
Why do we use service as as an interface..as far my knowledge, it provides methods signature which the implementing classes need to implement…thereby providing contract for the unrelated classes..In examples, I saw serviceimpl class which overrides a single method..
What for instance, if we like to add more methods in the interface later.Why do we not simply push all logics into service and rather make it as class than having as interface? plz if any help to guide
yes
If you’re asking about consuming json from the MVC services (i.e. converting/mapping the json output to Java objects), you can use libraries like Jackson.
This works when we create jersey project right ?