I have a class of Form and Student. A student may have 0 or many forms. I set the relation between them as OneToMany. Now, I need to fetch the forms that are owned by a specific student. I have two questions at that point. How should I fetch those forms in the URL? Let’s say I want to fetch
Tag: spring-boot
How to Test a Spring Boot 1.2.7 Application?
I need to test old Spring Boot Java application (version of Spring Boot 1.2.7, Java 1.8) and I don’t want to change Spring version (because the application is very voluminous and then I will have to refactor the code very much). I’d like to apply to input of my desktop application different table column types and test that application determines
Application Failed to start The Dependencies of some of the Beans form a cycle… Why?
so I have this section of code in AppConfig.java: if I get rid of the @Lazy it will not start, i have tried to get rid of the constructor and do: same thing, can someone please help me out, I really don’t want to have to use the @Lazy Implementation. here is the error it returns: When getting rid of
Access denied for user ‘root ‘@’localhost’ ” when connecting to mysql
I try to connect to a mysql database in a spring project and error occurred. The configuration in application.properties is In pom.xml is I’m sure the password is correct. And in cmd I tried following command and it work. So what’s the possible reason? Thx. Answer Remove the spaces on the sides of the = signs in your application.properties. 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
How can I get debug messages from Java’s SSL handshake?
I’m trying to secure a Java Spring Boot REST service with Keycloak. Part of that involves communication between the service and Keycloak to get the well-known OpenID configuration. When everything is unencrypted (over HTTP), things work fine. When I add an SSL certificate into the mix (technically on an nginx server in front of both services), I’m getting an SSL
Springboot/Thymeleaf – How to execute a different SQL query based on the URL?
I would like to be able to display different data based on the previous category that was selected. For example, I currently have categories, that once clicked should redirect a user to a new page that displays all the relevant information for that category. The url should look something like localhost:8080/category/321 where the ID of that category is last. I
Handle an exception in another method without losing the request objects from original one
There is an Exception that is thrown when an user is not found in database and i’d like to handle that particular exception from the controller perspective layer in a separated method by @ExceptionHandler annotation without losing the original data sent by the user. Well, so, i’m using Sessions and my first attempt was trying to get the object back
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
SpringBoot – i want to show login button for only users that are not logged-in
I am currently looking for a solution on how to not show the login button when a user is fully authenticated. This is for a personal project that I am doing. I want users to not be able to view the login button if they are connected, i already tried to look in the thymeleaf documentation i didn’t find an