Skip to content

Tag: spring-boot

Spring Boot, Spring-Security – BcrypPasswordEncoder in new component-based security configuration

I am trying to use the new Component-Based (Without WebSecurityConfigurerAdapter) configuration and setted up my Security Configuration as follow: file but when I run the application and try to log a user the following error appears even though I have the BCryptPasswordEncoder as a bean in my SecurityConfiguration: Error Stack Trace* Which is the correct way to set up

How do I execute a docker container

I created the images locally and created one repository in DockerHub called testName/backend. The docker images command shows the created images. And I would like to run the container with a command in the format docker run yourImage:version. So according to this (so I think I should call such a command: docker run 10fc47e065ff:0.0.1-SNAPSHOT However, I get this message: Unable

Propper way to describe request body as java class

What is the propper way to describe json body like this in spring-boot app? For now i have class like bellow, but i have problem with serialization of mpa and genres fields. Genre and Rating: Answer Jackson ObjectMapper cannot create the object, because neither default constructor exists nor any other creator is provided (e.g. @JsonCreator, @ConstructorProperties). You also have a

Log4j2 log file not created

For a spring-boot application I’m trying to set up a log4j2 logger that will write the logs into a few sperate files, but the logs are only written to the console, I’ve checked my user_dir to make sure I’m not looking in the wrong location as well. This is the code that should write the test logs: this is my

Spring boot won’t connect to Postgres database

I am trying to learn Spring Boot with a tutorial. I have the code and the database, but I keep getting a Hibernate ERROR whenever I try to connect the two… This is the Error I get: I have the dependency set up in my pom.xml: The StudentService And the StudentController class Unfortunately I have no idea what’s the

Pass value with @Value to @RequestParam

So basically I have my rootFolderId in my and I need to get it in the Controller and use it in @RequestParam like : but I get the problem “Attribute value must be constant” .Is there any way to make it work ? Answer You can use property replacement in the @RequestParam field. See below.