Category "spring"

How to replace an user's authentication 'http.formLogin()' with a form that is on another frontend server?

Inside a class that extends WebSecurityConfigurerAdapter, I have this authencitation method. I store my users inside an Active Directory. @Override publ

Annotation @Profile() doesn't work in Spring (not Boot) project

Annotation @Profile doesn't work or works wrongly. I want to get 7 beans: first-sixth and firstConfig. In package app.a I created three classes. package app.a;

How to solve java error on Geoserver GSR extension

I have set up a Geoserver instance. Now I need the GSR extension to have an ArcGIS compatible REST API. I installed the extension as described but on Geoserver

How to return all types except a certain type in MongoDB?

Let's say that there is a column called colours and it can have values red, blue, and green. I want to retrieve all rows except the ones where the colour is gre

How to import a bean which comes from a configuration bean conditional on another class?

I'm using a 3rd party dependency in my Spring Boot project (version 2.6.3) which has the following classes: @ConditionalOnProperty(prefix = "spring.cloud.vault"

Inconsistency between postgres and hibernate

Inconsistency between hibernate and postres. Consider we have table student having 2 columns id(Primary Key) and name. Perform the following concurrent query on

How to solve this leetcode problem of phone number pattern

package Code; import java.util.*; public class PhoneNumber { public static void main(String[] args) { int[] digits = { 2, 3 }; // int n = n

How can send custom error message after git push from local git server by using jgit api

I have been making a local git server by using jgit . Following is my code repository for local git server. https://github.com/masumcse1/mygitserver https://git

MappingSqlQuery pass parameter

String sql = select * from APPLICATION_LABELS where DATE_MODIFIED > '"+ new SimpleDateFormat("dd-MMM-yy").format(lastUpdate) +"'"); MappingSqlQuery&

Springboot 2.6.7 mongodb dependency not working on @SpringBootTest

I've recently upgraded my springboot dependencies from version 2.5.4 to 2.6.7 here my gradle file v2.5.4 plugins { id 'org.springframework.boot' version '2.5.4

How to get Grails Gorm autocomplete in regular Spring Data JPA

Grails GORM is able to autogenerate ORM findBy[fieldName] and related methods for each of the fields in the entity, I'm not sure what magic it uses to do this I

Integrating Birt report viewer in Springboot Thymleaf application

Is it possible to embed Birt report viewer inside my SPringboot+Thymleaf application?

@Autowire returns null after adding Spring AOP in an abstract base class

I'm using POM in my selenium automation project, so there is an abstract class BasePage extended by a DerivedPage which is used for test method The method which

Why is Spring @Transactional unreliable with AspectJ?

TLDR: this project reproduces the issue: https://github.com/moreginger/aspectj-no-tx Edit: Above now reproduced without jooq i.e. using plain JDBC. Edit: Spring

Struggling to switch between databases at runtime with Spring boot

I'm trying to change which database is used at runtime (like from H2 to MySQL and back). Is it also possible to make both of them be used simultaneously (meanin

spring boot transactional integration for event management

We have recently put a REST Spring Boot MVC application into production. We are using JPA with Postgresql in order to achieve some nonfunctional requirements: w

spring boot transactional integration for event management

We have recently put a REST Spring Boot MVC application into production. We are using JPA with Postgresql in order to achieve some nonfunctional requirements: w

MantToMany - Cannot add or update a child row: a foreign key constraint fails

I am trying to create Many to Many relationship and save some data to database. I have entities: @Data @AllArgsConstructor @NoArgsConstructor @Entity public cla

Is using @CrossOrigin the same as overriding addCorsMapping() in Spring?

In my controller I currently added the following annotation @CrossOrigin: @RestController @RequestMapping(value = "/dev/test") @CrossOrigin publ

Slf4j logger log fields from parent class

I have following code: @Slf4j public class Main { @Data public static class AClass { private String title; } @Data public static class BClass extends ACla