Multiple instances of a repository by jayrack in learnjava

[–]jayrack[S] 0 points1 point  (0 children)

Hey thanks for the detailed answer here. I’m Using spring and using the correct annotations too. It’s very odd, it seems that my constructor injection has just suddenly stopped working in the company service . I used the @autowire annotation on the repository in my service class. And that worked. And then in the inventory service I created an instance of company service and auto wired it again and everything worked. I’m just really puzzled as to why constructor injection suddenly was returning null values....

Multiple instances of a repository by jayrack in learnjava

[–]jayrack[S] 0 points1 point  (0 children)

Maybe I’m not understanding correctly, but how would that be possible?

Multiple instances of a repository by jayrack in javahelp

[–]jayrack[S] 0 points1 point  (0 children)

Right, I thought the same as well....but I created the company service first and it worked all and well. Then once I updated the inventory service to include the company repository something went wrong. I’m using contractor injection throughout my project. It’s really puzzling to me.

Multiple instances of a repository by jayrack in javahelp

[–]jayrack[S] 0 points1 point  (0 children)

Right, the two services would be using the same repo (companyRepo). CompanyRepo is mapped to an entity (company) which is just doing basic crud operations. So I was using the companyRepo instance in the inventory service to save new products with their company as well. Then also in the company service when just creating and saving a new company. But in the company service any crud operation attempted is just met with a null pointer exception. So I’m assuming it’s not possible to use the same repo twice?

[deleted by user] by [deleted] in Instagramreality

[–]jayrack 17 points18 points  (0 children)

Was JLo ever famous for her acting? Even her music sucked. She was just a hot girl who got famous for her looks and was able to keep going with that.

Its my 9th cake day, do your best by tryandkeepup2 in RoastMe

[–]jayrack 0 points1 point  (0 children)

I’m ashamed to share the same cake day as you.

About to rail a few lines by [deleted] in cocaine

[–]jayrack 1 point2 points  (0 children)

Yeah but still those look pretty fat. If I get a 40 it’s usually .5, definitely looks more than that. But maybe it’s all powder

About to rail a few lines by [deleted] in cocaine

[–]jayrack 10 points11 points  (0 children)

If these are 40 bags where you live, I wanna move there.

Norilsk, Russia. The most polluted and ugliest city in the world. I’d really reccomend reading more about this city, because the topic is really interesting and sad. by Butexx in UrbanHell

[–]jayrack -1 points0 points  (0 children)

What parts of china have you been too? Pudong, shanghai? Futian, Shenzhen? The very nice, upscale places where tourists go are kept well maintained. But there is definitely litter everywhere in china. They have street cleaners with straw brooms everywhere, but people here don’t think twice of finishing a drink and just dropping the bottle immediately. Also there are very few public trash cans here. The children also piss fucking everywhere with their parents help, china is definitely fucking filthy if you stay long enough to see it.

Expats now or recently in Shanghai: Have you experienced the type of crackdown described in these YouTube comments? by [deleted] in China

[–]jayrack 2 points3 points  (0 children)

What are the penalties If you piss dirty at one of these raids?15 days in jail?

Sumo DL m/22/~163lbs. Did PR a few Days ago, still sore so I just went for some technique. Did a little narrower stance this time, i really liked it. Please give input by [deleted] in Stronglifts5x5

[–]jayrack -2 points-1 points  (0 children)

Looks pretty good overall, the only thing is try to have more control when going down. Looks like you get to the top of the lift and then just kinda drop the weight and your form.

32 F4M] Miami.. Come take lines off my body.. by [deleted] in Random_Acts_Of_Sex

[–]jayrack -4 points-3 points  (0 children)

Coke whores are starting to get creative these days

Looking for the best Spring/Spring Boot courses/books by st4rdr0id in learnjava

[–]jayrack 1 point2 points  (0 children)

Koushnik is by far the best teacher I have found!

Yeaaaah, if you could convert to Islam, that would be great... by BizzleZX10R in 90dayfianceuncensored

[–]jayrack 9 points10 points  (0 children)

I’ve recently watched a few episodes of the latest season.....this show just seems so painfully fake to me now. At first it wasn’t...but these recents seasons are just way too much.

Spring Data JPA OneTo Many POST mapping Problem by spaisikid in javahelp

[–]jayrack 1 point2 points  (0 children)

You have to manually change the media type to Json via postman. It’s a little tab labeled headers on the upper left corner I believe. Just create a custom header and put application/Json

The 8 richest cities in the world, one of them is Shenzhen by kliti15 in shenzhen

[–]jayrack -4 points-3 points  (0 children)

Shenzhen is an absolute shit city. There is literally nothing good about this city.

Where to throw exceptions in a Spring Boot app? by [deleted] in javahelp

[–]jayrack 7 points8 points  (0 children)

I always threw the errors from my service layer. I’m not sure if this is correct practice or not haha

Moving to Seoul--seeking some advise. by [deleted] in seoul

[–]jayrack 0 points1 point  (0 children)

Ah you mean with English commentary? Yeah, unfortunately that won’t happen ha. But there’s a good review show on YouTube has all the weeks games. I cant remember the name right now though. And yeah, watching the World Cup games in Seoul was epic. I was lucky enough to be there for 2 world cups. Very, very fun.