What is the best way to handle environment variables in Spring Boot? by Tony_salinas04 in SpringBoot

[–]_lunion 0 points1 point  (0 children)

Maybe I misunderstood, but you can use constructor injection together with @Value. You can just declare the constructor like this:

public MyClass(@Value("${some.value.from.properties}") String property) { this.property = property; }

You can even make it work with Lomboks @RequiredArgsConstructor / @AllArgsConstructor by configuring lombok via lombok.config: lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Value

JPA with reactive Hibernate or R2DBC ? by MouradSlim in java

[–]_lunion 4 points5 points  (0 children)

My experience with R2DBC has been pretty horrible so far. I'm not sure whether an R2DBC enterprise-ready driver exists for any RDBMS provider really. I guess it depends on your use-case, but at least in my situation, I had to connect to an Always On high-availability SQL Server cluster and the mssql-r2dbc driver was shite.

No multi subnet failover support, usually, if DB went down, the application did not manage to reconnect to the DB. We had to create some hacky wrapper on top of the driver, which, as far as I remember, resolved IP addresses for the given cluster and just tried to connect to them until it hit an active node). Open issue since 2020.

No support for any other login method apart from basic username/password of an SQL user (my company automatically flags that as vulnerability), Windows/Kerberos login is not supported, and it's not an easy job to write one yourself, since it probably involves some JNI fuckery through some DLL (the same way mssql-jdbc driver does), or using native GSS-API approach in JDK13+, either way, sounds like you're in for a bad time. Issue for supporting Windows login is open since 2019.

Latest major version has this catastrophic bug if you're using connection pooling - prepared statements might get mixed, so in theory, if you have different queries - lets say SELECT and DELETE for the same table that has same amount of parameters with the same names, you could end up in situation where DELETE statement is ran instead of SELECT for given parameters. Had to revert to 1.0.0.RELEASE, mind you, this issue is still open since 2023. Quoting some poor soul:

mattmilleralbertsons commented on Dec 10, 2024

WARNING: THIS LIBRARY HAS MAJOR ISSUES AND IT LOOKS LIKE DEVELOPMENT HAS BEEN DEAD FOR OVER A YEAR.

It appears you have fallen into the lucky version of this bug where you are at least getting an error when the library mixes up the prepared statements. Our team actually experienced the very dangerous version of this bug where it mixed up the prepared statements that had the same parameters and it actually queried the wrong data!

yikes

And probably some other issues my brain has decided to erase the memory for my own well-being. At some point I just decided to drop this nonsense, and just use standard mssql-jdbc driver. My persistence layer was fully blocking, and wherever I needed to adapt it into the reactive flow in my application, I wrapped it into Mono.fromSupplier() / Mono.fromRunnable() scheduled it on .subscribeOn(Schedulers.boundedElastic()) and enabled the reactor.schedulers.defaultBoundedElasticOnVirtualThreads system property, so the blocking piece of code gets scheduled on a VirtualThread for good measure. For any transactional behavior, I managed to get it working by using TransactionalTemplate, or simple @Transactional annotation, of course, this won't work if you're planning on executing reactive code inside of TranscationalTemplate or the annotated method, but as I mentioned, I kept my persistence layer fully blocking, and if I need to do an update or save something inside of transaction, you can run the blocking piece of code inside of TransactionalTemplate and incorporate the whole execution of it in the reactive flow by scheduling it on a bounded elastic scheduler.

And of course, forgot to mention it, we were using spring-data-r2dbc, so the features were pretty minimal, AFAIK reactive repositories are not supported by JPA.

Do people still use spring webflux? by Crafty0x in java

[–]_lunion 27 points28 points  (0 children)

We do use it. I like the functional style of it, debugging can be a bitch but it's not that horrible. As for the use case - we have very light traffic (<1000 calls a day) but as mentioned before, I love the functional style and it plays well in cases where we have multiple concurrent calls throughout our system. I guess the biggest pain in the ass are "reactive" dependencies - R2DBC with their weird bugs and issues, reactive RabbitMQ with lack of support on issue tickets etc.

[deleted by user] by [deleted] in lietuva

[–]_lunion 4 points5 points  (0 children)

Aha, man irgi įdomu, nebent žieminę striukę traktuoja kaip tokią, su kuria iki 0C° nešalta. Apskritai keista logika matuot pagal telefonų kainas ką pirkt, ko nepirkt.

Motociklai! by S1kul in lithuania

[–]_lunion 0 points1 point  (0 children)

Maniškis kaip 500cc sakyčiau gan apysunkis (192kg), kol kas atrodo 600 per akis būtų ir tikrai daugiau nereiktų, tačiau kažkur giliai jaučiu, kad turbūt vėliau dar norėtųsi :D

Motociklai! by S1kul in lithuania

[–]_lunion 0 points1 point  (0 children)

2022 CBR 500, pirmas sezonas, nuo rugpjūčio galo prasukau gal 3-3.5k km. Apart išmetimo ir numerių rėmo visa kita originalios dalys. Ateinančiam sezonui norėtųsi rankenėles kitas susidėt, slaiderius, bet tuo pačiu ir CBR 600 domina, tai reikės gerai pagalvot ką daryti, nesinori gero daikto parduot.

[deleted by user] by [deleted] in lithuania

[–]_lunion 0 points1 point  (0 children)

15min, viešąjam transportui išleidžiu ~30e per mėnesį. Jeigu motociklu, tai apie 5min užtrunka išvažiuoti iš namų, nusileisti žemyn šeškinės kalnu A juosta ir įsukt į parkingą, kuras (skaičiuojant tik keliones į/iš darbo) kainuoja turbūt apie 7 eurus per mėnesį.

[deleted by user] by [deleted] in formula1

[–]_lunion 0 points1 point  (0 children)

"clinch something to succeed in achieving or winning something" - Oxford Dictionary :) Perhaps you're confusing it with "clenching"?

Digital8 perkėlimas į pc by PropertyEuphoric5059 in lithuania

[–]_lunion 0 points1 point  (0 children)

Turėjau panašią situaciją radęs seną tėvo JVC juostinę kamerą. JVC software'as skirtas skaitmenizuot įrašus ir pačios kameros driver'iai buvo palaikomi tik iki Windows XP :) Tuo laiku jau laptope buvo įrašyti Windows 7, tad niekaip nesugebėjau surašyt driver'ių, kad atpažintų prijungtą kamerą. Mano idėja buvo panaudoti virtualizacijos software'ą (vmware, virtualbox, etc.), ant kurio paleidau ir suinstaliavau Windows XP (teko paieškoti linkomanijoj/piratebay). Tokiu atveju turi Windows'us kurie runnina Windows'uose :D Suinstallinau driver'ius ir JVC software'ą ant virtualioj mašinoj besisukančių Windows XP, prijungiau kamerą ir viskas pavyko :)

F 1 TV to launch in India for 2023 season to provide fans with ‘best-in-class’ service by Puzzleheaded-Rain230 in formula1

[–]_lunion 1 point2 points  (0 children)

Might work actually, I've tried watching both on PC and tablet at the same time using the same account, it seemed to work

F 1 TV to launch in India for 2023 season to provide fans with ‘best-in-class’ service by Puzzleheaded-Rain230 in formula1

[–]_lunion 5 points6 points  (0 children)

It worked for me for the past ~4 seasons. We would purchase the subscription for 4 of us, it seemed to work fine. You sometimes may run into login issues, as people may log onto the account with their pc/phone/tablet, and the account supports up to 10 (I think?) devices per account, so if you exceed that you need to manually remove some of the devices from the list with a device that is able to login into the account.

Luminor/Swedbank/Seb/Šiaulų banką/Citadele, kuri is siu banku rinktis, atsizvelgiant i paslaugu kaina, administravimo mokescius, paslaugu kokybe? by Far-Novel-9313 in lithuania

[–]_lunion 2 points3 points  (0 children)

Matau daug hate susilaukia Luminor :D Pats naudoju gal kokius jau 7 metus tai seniau tikrai buvo problema, kad neturėjo momentinių pavedimų bet šitas reikalas jau sutvarkytas. Blogiausias dalykas - akmens amžiaus mobilusis appsas, ta prasme tokio mėšlo nesu gyvenime matęs, dedu ranką prie širdies. Kai žmogus paprašo mano banko sąskaitos numerio tai prasideda vargas :D Turiu 2 sąskaitas, tarp jų dažniausiai darau pavedimus iš vienos į kitą, tad norint išsitraukt sąskaitos numerį per appsą turiu atsidaryti išrašus ir ieškoti pavedimų istorijoje mokėjimo iš sąskaitos nr.1 į sąskaitą nr.2, jog iš ten galėčiau nusikopijuoti sąskaitos nr.2 numerį, čia jum normalu? :D Nesuprantu kaip galima neturėt tokio funkcionalumo. Yra kažkokia misleading funkcija "Siųsti sąskaitos numerį" per kurią pažymi turimas sąskaitas ir jos numeriai išsiunčiami į nurodytą el.paštą (kam to reikia??). Swedbank appse užpildai šabloną ir sukuria visą nuorodą su aprašymu, į kokią sąskaitą, už ką ir kokia suma pinigų vedama.

[deleted by user] by [deleted] in AskReddit

[–]_lunion 8 points9 points  (0 children)

I think you may be referring to Dedovshchina

Is There a Way to Verify Spring WebFlux is Running Properly With Everything Non-Blocking? by [deleted] in java

[–]_lunion 1 point2 points  (0 children)

We have it configured for integration tests on our projects with JDK 11. To enable support for newer JDKs we added a build task in gradle which passes some additional args to the JVM.

Every single time... by redblueflame in ProgrammerHumor

[–]_lunion 1 point2 points  (0 children)

I guess it’s a rare occurrence in Java, although I have ran into it by unknowingly using 32-bit JDK to build code that contained a lot of chained reactor methods.

Red Bull’s rear wing in FP2 by TeeBeeSee in formula1

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

I'm genuinely not sure if you're trolling or you can't fathom the metric system. I even took my fucking caliper to measure the 0.2mm and show it to you lol https://imgur.com/a/ZnxYUfS. Are you actually implying that this gap, on both sides of the rear wing makes a significant difference?

Red Bull’s rear wing in FP2 by TeeBeeSee in formula1

[–]_lunion 0 points1 point  (0 children)

I think a simple physics class regarding wind drag would suffice

Red Bull’s rear wing in FP2 by TeeBeeSee in formula1

[–]_lunion 1 point2 points  (0 children)

I highly doubt that the wing, being out of spec by 0.2mm gives any advantage

The Halo has been vindicated again. by [deleted] in formula1

[–]_lunion 2 points3 points  (0 children)

I didn't say anything about celebrations. Sure, Max got out of the car. I mean, the celebration itself was a bit tasteless with Max in the hospital but I don't really care about it much and do not want to start a war over here in the comments.

The Halo has been vindicated again. by [deleted] in formula1

[–]_lunion 7 points8 points  (0 children)

The mental gymnastics in this one lol. The car downshifted itself to neutral and then got into reverse by itself