I have problem understanding how to connect 3 tables with spring-boot / hibernate. Tables are: Users, Technologies, Categories Every user has all of the 10 categories but inside this categories they can save one or more technologies. Each technology can be listed in several different categories. I have a code that works partially as for now instead referencing the table
Tag: spring-boot
Spring is trying to subclass a record component when aop is present
I have a spring boot application in which I make use of aspects. Recently, I tried converting my @ConfigurationProperties classes to java records, but it fails with “Cannot subclass final class {..}Properties”. It seems spring is trying to make cglib proxies for my records, which obviously fail. Is there any way to tell spring not to make proxies for specific
Spring Boot session scoped bean
I am trying to understand how the Session scoped bean work and have tried the example from here. HelloMessageGenerator.java HelloMessageBean.java HelloMessageController.java When I go to http://localhost:8080/scopes/session I get an error. scopesExample.html The error I am getting is as if the mapping would not exist: Answer I was missing the thymeleaf dependency in the pom. This is why I was getting
SortedSet + Hibernate’s @SortNatural + Comparable not sorting elements when fetch from DB
I know similar questions have been asked before, I looked through them but still can’t figure out why in particulary this case sorting is not working. I have 2 Entities – Category and Transaction with relations OneToMany. Inside one category there can be many transactions and One transaction belongs to certain category. When I fetch the category from DB I
Spring AOP and AspectJ on same method
I have a question about using aspectJ and spring aop method intercepting. I created 2 annotations: @AJTest and @SAOPTest. registered it and other and register it and added it to my method in controller Application class but when i call it by http://localhost:8080/test?firstParam=test&secondParam=2 i can’t see message with time of execution of the method, but can see how many parameters
Application build is successful but getting error: ‘no main manifest attribute, in app.jar’ while running the image
I am trying to deploy my spring boot application on a docker. I have created a docker file as follows. The docker file builds fine but when I run the image it throws the following error: Please note that my application runs on JDK 11, maven build and already added dependency for spring-boot-maven-plugin. I couldn’t find a proper solution for
Jackson module not registered after update from Spring Boot 2.4.x to 2.5.x [duplicate]
This question already has answers here: Spring Boot 2.5.0 and InvalidDefinitionException: Java 8 date/time type `java.time.Instant` not supported by default (4 answers) Closed 6 months ago. After updating my spring-boot-starter-parent version from 2.4.8 to 2.5.4, I started having this error with jackson serialization, when trying to deserialize a LocalDate: To my knowledge, this shouldn’t happen (and it doesn’t on previous
is it possible to make swagger do not show the reference project api
Recently I found my swagger UI document shows so much api entry point. Finally I found that the document also shows other project entry point. For example, Spring Boot project A imported Spring Boot project B and C, but the Spring Boot project A shows A + B + C’s api entry point in project A’s swagger UI, is it
Spring boot how to use @PostConstruct correctly
Spring boot 2.5.4 I used @PostConstruct for the very first time in my service class. As following:- This method is called as soon as app launched. That is my requirements to process all file as soon as the app starts. I have controller as following:- My app starts on port 8080 and no exception at all. But when I get
Uploading files to S3 in Multithreading
I’m uploading files to s3 using the s3 AWS client in my spring application, but sometimes I’m getting the error, So as a solution to this I used the following approach and it worked for now. I have created this as a Spring Bean. But I am using this in a multithreading environment. So there will many concurrent requests at