In my Spring Boot application, I have: @Configuration @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { ... @Ove
SecurityContextHolder.getContext().getAuthentication() obtains the currently authenticated principal, or an authentication request token, but in which context s
There is the Customer entity which has a one to many relationship to entity Address,so there is a List<Address> getAddress in Customer.Entity Address has
I have a react project, and the security works fine untill I navigate within page - i.e. clicking buttons etc. But, if I refresh page, or input url directly int
I have a fairly simple case where I am trying to add HTTP headers (not SOAP headers) to a request I am making using Spring's WebServiceTemplate. I have defined
I want to configure logback in such way that some specific appender will work only if system variable LOGGER_ENABLED is set to true. If the variable is not set
I have a problem testing a method in Java (I use jUnit 4) and this method to test make a call to a repository and should throw an exception if something is wron
I have this strange issue in my Junit 4.12 test code. The application uses Spring Framework 4.1.6 and Hibernate 4. When comparing two beans coming from differen
I am writing unit test cases using Mockito and JUnit . But getting NullPointerException when running a test. On debugging I get to know that Mockito on method:
I am trying to use Spring data and repositories in a Spring Boot application, but I have an error when compiling the project. Here is my Entity : package fr.i
I can successfully connect to my openshift mysql through workbench, how do I do the same through my spring boot application? in my application.properties: # C
I just created a batch job using Spring Batch framework, but I don't have Database privileges to run CREATE SQL. When I try to run the batch job I hit the error
This a springboot Application. It run perfectly but did not get output (it shows me HTTP Status 404 error in browser) pom.xml <project xmlns="http://maven.
I am trying to compile my project with Java 11. When I try to run the application with Java 8 as the Java version in pom.xml, it works fine. But when I try to r
Hello when trying to use spring-redis i am getting java.lang.NoClassDefFoundError: Could not initialize class org.springframework.data.redis.connection.jedis.
We have two projects behind same domain ( zuul proxy in front of them ), both uses spring session project with sessions kept in redis. Those two sessions shou
I am using Spring Data JPA and Spring Boot. The layout of the application is this main +-- java +-- com/lapots/game/monolith +-- reposi
I want a pass a dto and another value using the @RequestBody in spring. Something like shown in below,(This is my controller code) public User createUser( @Req
I created an interceptor to get the token before i do other request but i have the error "Method threw 'java.lang.StackOverflowError' exception." when i do the
please could somebody help to resolve issue: backend spring application web.xml <filter> <filter-name>corsFilter</filter-name>