Himai Minh

+ Follow
since Jul 29, 2012
Forum Moderator
Himai Minh currently moderates these forums:
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Himai Minh

Topic : Mitigating Scheduling of Medical Staff in a covid-19 Clinic by Quantum Annealing
Date time : Oct 31 Saturday 11:30 am - 13:30 Eastern Daylight Time
Speakers: Dr. Kunal Das,  Asmita Banerjee , Arindam Sadhu
Moderator : Dr. Faishal Khan
Sign up : https://www.meetup.com/Washington-Quantum-Computing-Meetup/events/274010060/
Event sponsor: Association Quantum, Cambridge Quantum Computing

5 days ago
Also, one more note. I think you only need to pass the integer id to the delete method. You don't need the RequestContext.
5 days ago
In Spring, your request is converted into Json by default.
You pass in a customized object type to a method, it will be converted into JSON by Spring.
1 week ago
Hi, Tangara,
For MediaType, you can use org.spring.framework.http.MediaType. There are different types in this class, such as APPLICATION_JSON, APPLICATION_ATOM_XML and etc.
If you choose to use Spring framework, then stick with it and don't need to use JEE for Restful.

If can return ResponseEntity with a status such as new ResponseEntity<>( message, HttpStatus.OK) or new ResposneEntity<>(message, HttpStatus.BAD_REQUEST) and etc.
2 weeks ago
The PetController is not using any Spring's Restful features.
I am sure javax.ws.rs-api is from JEE,not Spring
In Spring , you can use ResponseEntity<>  to return the output.

You may want to use these as reference:
2 weeks ago
Hi, Tangara,
What database do you use?
Maybe try to use a simple embedded h2 database for test purpose.
So, your application.properties should have these:
2 weeks ago
Hi, Targara,
The CrudRepository can be used in Spring boot / Spring framework.
You can use Spring intializer to generate a Spring boot project and add some child classes for CrudRepository.
2 weeks ago
For the above example, in Spring, we use @Autowired to inject the PetRepository.
3 weeks ago
You may find this tutorial helpful. You can create a repository class extending the CrudRepository .
3 weeks ago
Hi Cecile,
I recommend Spring In Action 4 and 5 edition as well as Getting Started with Spring Framework cover Spring Framework 5.
You may also consider this book Pivot Certified Professional Core Spring 5 Developer Exam.
Search for Ivan Kriszan 's notes for a quick review.

I also recommend Dominik Cebula's 8 modules on Udemy. He just published some practice exam for his module 1.
Some students said they passed the exam after taking those courses.
His courses are exam oriented with a lot of practical code examples.

Good luck.
3 weeks ago
Hi, Martin,
In your RoomController, you can add two methods for PUT and DELETE.
PUT is for updating an existing room or for adding a new room.
1 month ago
Hi, I am practicing with my instructor's code.
I have a @RibbonClient ("currency-exchange-service). Currency exchange service is a secure microservice with basic authentication features (using username/password).
Currency conversion microservice sends a request which goes through my Zuul gateway and then go to currency exchange service.
In the code of conversion service , I have @FeignClient("zuul-gateway-service)

In currency exchange service, I have a basic authentication request interceptor bean to accept the username password read from a properties file.

My problem is the request cannot be authenticated after it goes through the Zuul gateway. I cannot search for a solution.
How can the request be authenticated by the ribbon client, currency exchange after it goes through Zuul.

Here is my code:
currency conversion service:

currency exchange service:

Zuul gateway services that intercepts currency conversion service request:

Eureka service that registers the above services:

1 month ago
Hi, Alejandro,
I believe your application is a Spring boot application and I believe you have this dependency:

In this dependency, the JSON parsing is included.
The artifact that takes care of JSON parsing is:

In this artifact, there is another one:

Therefore, as long as you have the spring-boot-starter-web dependency, your JSON serialization / deserialization is handled.
1 month ago
Hi, Mike.
I read Spring in Action 4th and 5th edition as well as Getting Started with Spring Framework 5.
Also, you may want to try Iuliana Cosmina's new study guide as promoted on this forum.
I heard there are some sample questions in her book.

I recommend you to take itestjava's mock exams. But mock exams are just for practice. The real exam is
harder than those mock exams.

You can also consider taking Dominik Cebula's Spring Professional Certification courses on Udemy.
A lot of students said his 8 courses are very helpful for them to pass the exam.

Good luck.
1 month ago