Skip to content
Advertisement

Tag: spring-boot

Connecting 3 tables with hibernate / spring-boot

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

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

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

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

Advertisement