Skip to content
Advertisement

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

@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

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

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

Advertisement