Pseudow
JCHJava Community | Help. Code. Learn.
•Created by Pseudow on 5/6/2025 in #java-help
Spring Redis
Hi, I am currently using Spring Boot with Redis and I am using the Caching annotations.
Do you know why the first time I hit the endpoint Spring will still make a call to my db even though the data is already in my Redis?
After that it will take data from Redis.
8 replies
JCHJava Community | Help. Code. Learn.
•Created by Pseudow on 8/10/2024 in #java-help
Kotlin coroutine
Hi do you know how do I proceed to have my coroutines run on different threads? I have tried this to speed up:
but it tourned out it was less fast than concurrent only?
6 replies
JCHJava Community | Help. Code. Learn.
•Created by Pseudow on 4/21/2024 in #java-help
Protobuf Proto source set not added

4 replies
JCHJava Community | Help. Code. Learn.
•Created by Pseudow on 4/20/2024 in #java-help
hasAuthority Spring doesn't work
Hi I have replaced the default permission evaluator but now it just makes the hasAuthority not working (I am using the same example as the ones on google but it doesn't work with me)
Here is my error
Property or field 'hasAuthority' cannot be found on object of type 'org.springframework.security.access.expression.method.MethodSecurityExpressionRoot' - maybe not public or not valid?
6 replies
JCHJava Community | Help. Code. Learn.
•Created by Pseudow on 4/19/2024 in #java-help
Ktor Login Bearer Token
How can I make a login step using credentials to retrieve my bearer tokens with Ktor because in the inialization of my client I can't access the client itself?
5 replies
JCHJava Community | Help. Code. Learn.
•Created by Pseudow on 4/17/2024 in #java-help
Spring admin authorization
Is it possible to give all authorization to administrators without having to create all existing permissions to add them to the role?
4 replies
JCHJava Community | Help. Code. Learn.
•Created by Pseudow on 4/14/2024 in #java-help
Spring Context Holder
How spring context holder works? Does the current user is stored in the client or something like this? Because basically if I made an API should I rely on a JWT or just the context holder is enough?
4 replies
JCHJava Community | Help. Code. Learn.
•Created by Pseudow on 3/30/2024 in #java-help
Spring Password Encoder Argon2
Hi I just went into the spring argon2 password encoder and I saw this:
spring encode my password with all the params to decode it, so should I rewrite my own password encoder or anything like this?
4 replies
JCHJava Community | Help. Code. Learn.
•Created by Pseudow on 3/9/2024 in #java-help
Kotlin Serialization Spring Integration
Hi I encountered a problem, I am currently trying to create unit test in order to test my API responses but I just found out that even by specifying that I want spring to use kotlin serialization to serialize controller responses it doesn't not work.
Here is my configuration:
I even tried to just remove the json from my dependency:
But it doesn't work and I get a weird serializable
5 replies
JCHJava Community | Help. Code. Learn.
•Created by Pseudow on 3/9/2024 in #java-help
Kotlin Serialization
Hi guys do you know why do I get an error from my kotlin code?
I get this error from the class
InvitationAlreadySentException
Impossible to make this class serializable because its parent is not serializable and does not have exactly one constructor without parameters4 replies
JCHJava Community | Help. Code. Learn.
•Created by Pseudow on 3/1/2024 in #java-help
Spring Security Mock MVC Test
Hi I am trying to use Spring to test my controller but here is the definition of my test class:
In the SpringBootTest#classes method I specified my controller but when I run it, Spring doesn't automatically create all needed beans for example ProfileService or ProfileDao
4 replies
JCHJava Community | Help. Code. Learn.
•Created by Pseudow on 2/22/2024 in #java-help
Snowflake x Spring
Hi I am planning on using Snowflake algorithm to generate ids, but I wanted to know more about it so basically there are three ways of customizing it with the timestamp bits, the generator bits and sequence bits. The addition of all those bits have to equal 63 bits but what is the best way to make it work with my spring application? Each backend instance would have an unique generator id? Because if for example there are two backends that receives one request at the same time to send a message for example with the same generator id it could potentially create two same ids?
7 replies
JCHJava Community | Help. Code. Learn.
•Created by Pseudow on 2/3/2024 in #java-help
Spring Security
Hi is it possible to modify how spring security deals with passwords? Actually I would like my password to stay only in my database and never retrieve it just checking if for the account the password matches. But everywhere including in UserDetails I have to give access to the password to Spring.
45 replies