Category "spring"

Canno't deploy Spring boot app to Tomcat9 FAIL - "Application at context path"

when I try to start the app through the manager I get FAIL - Application at context path [/imoveis-0.0.1-SNAPSHOT] could not be started FAIL - Encountered excep

Spring Boot: Optional mapping of request parameters to POJO

I'm trying to map request parameters of a controller method into a POJO object, but only if any of its fields are present. However, I can't seem to find a way t

how can it solve correct converting to map from vo object in spring?

parameter VO in spring public class Person { private String name; private int age; private String job; public void setName(String name){ thi

Hibernate handles id assigning instead of database

I have an auto-increment PK in a table and I want hibernate to handle id assigning instead of database. As my understanding the @GeneratedValue(strategy = Gener

Upgrade from Elasticsearch 5.2.1 to 6.8.22 encounter issue: java.lang.LinkageError

Our project need to upgrade elasticsearch from 5.2.1 to 6.8.22. We encounter an issue now. The war can be deployed successfully in jboss server, but will contin

How can I delete a row by its SKU instead of its ID?

I try to delete the row using the sku of the product. I'm using spring boot and angular. I got an error when I added the sku on my button like this one (click)

Spring Security "Administrator" Access to all URLs

In Spring Security configuration I have something like following: http.authorizeRequests() .mvcMatchers("/admin").hasRole("ADMIN") .mvcMatchers("/studen

Custom IdentifierGenerator returns null

So, I want to customize the ID for a "FriendID" with IdentifierGenerator, and I want to make it as simple as possible first just to make sure it works. Been wat

Spring one Controller for nested entities

I'm working on a school project and I'm not sure how to implement this case. I would like to implement it as best practice. Right now I have 3 entities -> St

E-commerce background business process Java and Spring

I need create a ecommerce api using Java and Spring. But how create a background process, for example: After place order, i need send confirmation e-mail, wait

Invalid entry CRC in Spring boot

Hello so today I planned to do some work but now, all my projects are --- I dont know what happened, the same errors occurs in intellij, vscode. Can someone gui

when i add opcion forEach method get java.util.ConcurrentModificationException: null

I have a problem, I have a question entity and an option entity, the relationship is one to many. but when I want to add the options in the question, it shows m

Spring Batch - Resume already started job when master fails

I didn't find an answer to my question so far so I'm giving it a try here. Let's assume a Spring Batch application with remote partitioning. There's one master/

How can I do in java spring boot not try a database connection on start up?

I need to know if there is a way in Java Spring boot not to try a connection at startup. What I am trying to do is an integrated SQL server connection. I am try

Java ORM vs multiple entities

I have a class Health Check - as part of the class I record how many parasites are seen (enum NONE, SOME, MANY) and also the location of the parasites (enum HEA

set Domain on cookie using spring security when login success

How can I set the property "domain" on the users cookie when the user has authenticated from spring? Edit: id like to add domain=".mydomain.com" to cookie with

Is there any way to enable/disable a annotation by property in Spring Boot?

I have some property file like: application.properties enable.test.controller=true enable.cross.origin=false I want to enable/disable some functions based on t

Spring's @DateTimeFormat ignores wanted date format pattern

Can't get my head on how date formatting using @DateTimeFormat works. I send query with date params being: dateCreateFrom - 01.04.2022T00%3A00%3A00 dateCreateTo

How to use ValueFields in Activiti

I'm new to Activiti I I'm trying to retrieve some data from database MySQL using ValueFields interface and I don't know how to use it. This is the data I'm tryi

AWS cloudwatch logs datetime_format config combine multiple lines into one line

I use aws cloudwatch to collect aws ecs farget task's logs. The config is in the following pic: And I get the following logs, it is wired. Some lines with date