Comment by M. Prokhorov on How can I tell if a Spring ApplicationContext has...
@Eugene Yes, but the question reads as if from developer of a tool that sits to the side of typical Spring startup, and you aren't able to alter application startup code. Though if that's true, then...
View ArticleComment by M. Prokhorov on Spotify Oauth2 authentication using Java Spring Boot
It's not clear which part of your application receives the 403 status. Is it the execute() inside /get-user-code?
View ArticleComment by M. Prokhorov on what are the pros and cons of using Hibernate...
As of 2024, while Apache BVal is still not certified (whatever that even means), its release cadence definitely picked up, and as of writing this, it supports Jakarta Validation 3.0 spec, and latest...
View ArticleComment by M. Prokhorov on Can i put not null constraint to FK?
We can't really design your system for you, because we don't know full spec of it. What is the specific perceived problem you are trying to solve? Why not indeed simply make it a non-null FK?
View ArticleComment by M. Prokhorov on Hibernate Constraint Primary Key
The main property of any primary table key is its uniqueness within the owning table. Your expressed intent with "having two rows with the same primary key" contradicts this property, so you can't do...
View ArticleComment by M. Prokhorov on Java stream an array list and compare with...
You are not avoiding loops by using streams - you just move the loop into the streams library. It's still going to be there, just not as visible and harder to debug.
View ArticleComment by M. Prokhorov on Use dynamic column names in Spring Data JPA
You totally can concatenate a parameter with % inside the query itself, you just need to use correct concatenation syntax from the database dialect.
View ArticleComment by M. Prokhorov on Java stream an array list and compare with...
You are not avoiding loops by using streams - you just move the loop into the streams library. It's still going to be there, just not as visible and harder to debug.
View ArticleComment by M. Prokhorov on LocalDateTime to java.sql.Date in java 8?
@user9999, comments here are not part of my answer, and there isn't anything unclear about the original question, as far as I'm concerned. If you think my answer is misleading - explain how and why.
View ArticleComment by M. Prokhorov on How can I interpret this error? Required type:...
The error message you got refers to java's type system. As stated in the answer below, the compiler expects you to pass a Supplier<R> into the method. You passed Collector<T, A, List>, and...
View ArticleComment by M. Prokhorov on intellij-internal error-buil error in java
Did you read what the error says? Did you do what is suggested by the error message?
View ArticleComment by M. Prokhorov on Can Spring prioritize which Content-Type to...
@JensD, good to hear! I didn't add all the required annotations because I assumed you already have a WebMvcConfig somewhere in your project, sorry about that.
View ArticleComment by M. Prokhorov on send image to telegram as InputStream instead of File
@zappee Constructor that takes a stream also needs a file name as second parameter. But this is available since version 4.0.0, so you definitely have it, even though you don't have the latest version.
View ArticleComment by M. Prokhorov on Is it okay to have just java wiremock deployed as...
I don't quite understand what is the problem here. Does something not work? What do you expect this code to do? Is this a setup for running tests?
View ArticleComment by M. Prokhorov on Running into this Error creating bean with name...
Why are you trying to exclude AOP from the project? It's one of the core Spring technologies.
View ArticleComment by M. Prokhorov on Default type converters not loaded after Java 21...
According to logs, you upgraded both Spring and Camel through several major releases (at least for camel it was 2.25.3 -> 4.6.0). Did you read both libraries' migration guides?
View ArticleComment by M. Prokhorov on How to programmatically set the volume on a car...
Just as a guess, have you tried using other STREAM_* constants? Maybe your particular radio uses system stream or something like that.
View ArticleComment by M. Prokhorov on How do I Update My SoundPool Constructor to Use...
STREAM_MUSIC is likely replaced with CONTENT_TYPE_MUSIC (and STREAM_MUSIC has value of 3, which corresponds to CONTENT_TYPE_MOVIE, btw). You should review descriptions of those constants and use the...
View ArticleComment by M. Prokhorov on How to override generic method in subclass java
Wouldn't that TypeReference just point to Object all the time?
View ArticleComment by M. Prokhorov on Upgrading React Native version and came across...
Are you also converting to Kotlin?
View Article