Skip to content
Advertisement

Tag: spring

Java ORM vs multiple entities

I have a class Health Check – as part of the class I record how many parasites are seen (enum NONE, SOME, MANY) and also the location of the parasites (enum HEAD, FEET, BODY). Two ways this could be done: METHOD 1 Health Check Parasite Or I could have: METHOD 2 Would method 1 require @Entity on parasite class and

Can I use Azure Event Grid topics to communicate domain events in a microservice architecture?

I am confused. When comparing the messages services offered by Microsoft Azure, we can choose between: Event Grid Event Hubs Service Bus (Azure Cache for Redis) This link gives the following comparison: Now I’d like to write a microservice application consisting of several components. Each component should communicate local domain events to a topic (pub/sub). This could be achieved by

Merging two Spring Application Context without closing the first application context

In our application start-up, we are creating one application context having its own bean configuration xml. Then depending up on certain logic, we would need to dynamically load/import the second bean configuration into the existing application context. One option is to close the existing application context and creating a new application context by importing both the bean definition xml files.

Garbage collector vs IOC

Today I attend the interview I am a newbie to java, spring boot. The interviewer asked the question about garbage collectors. I said the garbage collector will release the unused resource. Then he asked about the IOC container, I said it take control of object creation and will inject into the dependent bean. Then he asked why we need to

How do I write a test for a service that uses other services in Springboot?

I have a BookManagementService that uses the @Autowired implementation of three other services, like so So how do I mock the aforementioned services and their repo in the BookManagementServiceTest? When the test start running and it gets to the yearService layer, it throws a NullPointerEXception cause the year it receives is null The BookManagementServiceTest Answer You just have to mock

Advertisement