I have one spring boot application pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www….
Tag: spring-boot
spring boot – displaying object data from controller in JSP
I have a User class, two JSP and one controller. I want to register a user, store their details in a database (H2) and display user’s name after registration. This is my home.jsp – This is my controller – This is my afterRegister.jsp – The object gets added to the database. What am I doing wrong when it comes to
Dependency error in Spring boot for Spring session and Redis. What is the correct dependency i have to use?
I have angular 2 front-end and spring boot back-end.I want to use username and password for login and then use x-auth-token to check session for each request sent from angular.I want to use Redis to store session.But i keep getting the below error when connecting to Redis.My assumption is my dependency version of spring session is causing the issue but
@Conditionalonproperty for complex objects to yaml
I am having yaml config with the next structure: And I need to init bean only if “myComplexObject” property is present in config. I’ve tried: But in this case spring boot ignores property and do not init my bean. But it works fine for simple structures like: Is that possible to use @ConditionalOnProperty for complex objects ? Maybe there is
Not able to prevent multiple concurrent login from the same user in spring security with spring boot
** Here I have edited my code as to see that i’m currently using in memory authentication for this purpose Here is my Security configuration file, What I want to achieve is for one user to not have concurrent sessions. With this code I can login with same user on multiple tabs. Eventhough the user has an active session Can
Connection refused trying to connect to mongoDB docker instance
I’m trying to deploy a simple app with a MongoDB with JPA, but I can’t make it work right. When I deploy the app in a docker container, I keep getting the following error: This is the dockerfile I use to build the image: And the docker-compose.yml I used to run mongoDB: My entities all follow the following pattern (being
Spring Boot @Mapper Bean creation issue : Application Failed to start. Error : Consider defining a bean of Type
I am new to spring, when i try to do the mvn clean install of my project this problem appears: Error The problem is that in the MainController there is the import of “UserService”: It is probably a trivial thing but I can not bypass the problem, below I insert “UserService” and the MainStart UserService.java UPDATE : I insert the
Liquibase bidirectional relationships changelog order
I’ve faced a problem when implementing liquibase in an existing project. So we have two entities: Company: Stock: And my liquibase changelogs. Company: Stock: And master: I have this exception: I understand that liquibase trying to create stock and then add company_id as foreign key although there is no company table yet. I have a bunch of bidirectional relationships and
SpringBoot MVC – Warning: org.apache.tomcat.util.net.SSLUtilBase : The JSSE TLS 1.3 implementation does not support authentication
A question about Spring Boot MVC with Tomcat and TLSv1.3 I used to have a Spring Boot MVC, Tomcat based web app, with very simple business logic, over ssl HTTPS. Per security team review, I had to bump the TLS version from TLSv1.2 to TLSv1.3. Thought is was very simple and could easily complete this task, I went to change
Checkmarx – How to validate and sanitize HttpServletRequest .getInputStream to pass checkmarx scan
Following are checkmarx issue details Unrestricted File Upload Source Object : req (Line No – 39) target Object : getInputStream (Line No -41) request objects get highlighted in checkmarx tool – How do I properly validate, filter, escape, and/or encode user-controllable input to pass a Checkmarx scan? Answer This worked for me – checkmarx pass this high vulnerability I used