spring-boot Questions

3

Solved

I created a New Security Expression in my spring project but it not working. Here is my code. Firstly, i make a CustomPermissionEvaluator which implement PermissionEvaluator: public class CustomPer...
Merrie asked 15/12, 2021 at 13:19

3

Solved

my EventListener annotation don't receive any Spring Event. Here is my code: @Component public class ProxyConfig { public ProxyConfig() { System.out.println("I can see this in the console"); }...
Frontolysis asked 20/7, 2016 at 17:51

4

Solved

New Spring Boot added exemplars support: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes#broader-exemplar-support-in-micrometer-112 After upgrading to Spring Boot ...

3

I have a SpringBoot 2.2.4.RELEASE with a RestRepostory like import io.micrometer.core.instrument.Gauge; import io.micrometer.core.instrument.MeterRegistry; import org.springframework.web.bind.anno...
Trumpetweed asked 13/5, 2020 at 9:39

5

I'm trying to setup ehcache in my Spring boot application. I have the following ehcache.xml and configuration file: <?xml version="1.0" encoding="UTF-8"?> <config xmlns...
Garate asked 24/7, 2023 at 1:12

4

Solved

I have a file uploading api which was working perfectly fine under the spring boot version 2.1.13. After upgrading the version to 2.5.2, it started to throw an exception. Looking at the changelogs,...
Marilynnmarimba asked 13/8, 2021 at 1:49

1

I am using openapi generator (5.4.0) with gradle. It is configured with spring generator name, and added lombok configOptions. additionalModelTypeAnnotations : "@lombok.Builder; @lombok.NoArgs...
Valais asked 20/5, 2022 at 15:12

4

Solved

My user DB table looks like this: CREATE TABLE user ( username VARCHAR(32) PRIMARY KEY, first_name VARCHAR(256) NOT NULL, last_name VARCHAR(256) NOT NULL, password VARCHAR(32) NOT NULL, enabl...
Tyranny asked 5/3, 2016 at 17:50

3

Solved

I am building a REST API using Spring and am currently authenticating all my requests using a custom user details service and this configuration code: @Override protected void configure(HttpSecuri...
Stepdaughter asked 23/3, 2018 at 13:16

2

Can I generate immutable models with open api generator without changing the mustache templates? My first thought was that the generator could be configured to generate Java records but I can't fin...
Proteose asked 14/6, 2023 at 9:50

3

The new Spring Boot 3.x upgrade (which also means an upgrade of Java to Java 17) has changed the namespaces from "javax" to "jakarta". I am getting an exception when I run my ap...
Imbrication asked 11/12, 2023 at 11:42

2

I'm working with Spring security and jwt ,but there is something that i don't understand in the configuration file (same configuration in all tutorials on JWT ) it is why to add the Custom jwt filt...
Bashful asked 12/12, 2019 at 10:2

4

Hi, I've been searching the web with very little success and I'm hoping someone here at SO might be able to help. Currently I have my Spring Boot API's (Version 2.5.4) accepting a JWT which is prov...
Histrionic asked 8/9, 2021 at 14:37

4

I and my friend were discussed about @ComponentScan and @Import. Which one is better? We have 2 different ideas. @ComponentScan: Easy to use, import all beans from the component scan. @Import: Yo...
Curry asked 11/4, 2020 at 7:58

5

Solved

I have the following setup: Gradle: 8.5 Spring Boot 3.3.0 Kotlin: 1.9.23 Before I used Spring Boot 3.2.6, and after update to the latest version I encounter the following error when running bootJa...

2

For each request interceptor is getting called almost about 10 to 15 times. here is the code... @Component public class CommonInterceptor implements HandlerInterceptor { @Override public boolea...
Concur asked 20/3, 2020 at 17:56

3

Solved

I have a Role enum, like this: public enum Role{ admin('a'), member('m'), pending('p'); char role; Role(char a) { this.role = a; } public char getRole() { return role; } public static R...
Hypognathous asked 31/12, 2019 at 13:54

3

When I execute mvn install -DskipTests Maven gives me an error related to virtual threads [ERROR] /E:/mycode/javaproject/rms/rms-parse/src/main/java/com/example/config/AsyncConfig.java:[19,49] 鎵句笉鍒...
Guerrero asked 15/10, 2023 at 3:44

5

I'm building a backend using Spring Boot 3.1.0-SNAPSHOT, which uses Spring Framework 6x. Interceptor: @Slf4j public class MyInterceptor implements HandlerInterceptor { @Override public boolean p...
Saxena asked 6/4, 2023 at 12:52

2

Solved

I have a SpringBoot based command line application. The application creates or deletes some records in a database. It does so not directly via JDBC but rather through a special API (instance variab...
Sharondasharos asked 11/2, 2022 at 23:9

2

Solved

I'm using this dependency into my spring bott service: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb</artifactI...
Lockyer asked 21/9, 2018 at 6:58

3

I have a @Component DataClientImpl that calls a REST API using RestTemplate. The API endpoint has query params, which are passed when calling RestTemplate. There is a @RestClientTest Test class Dat...
Daleth asked 30/11, 2021 at 0:14

5

Solved

Spring boot 2.6.1 supports logback 1.2.7 I've added the following dependencies in project <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</a...
Ghastly asked 7/12, 2021 at 6:25

2

Solved

I have following REST controller with GET method that have BODY, that works fine with tests and postman @RestController @RequestMapping(value = "/xxx") public class Controller { @GetMapping({"/fi...
Disturb asked 14/6, 2018 at 15:57

3

Solved

I need to be able to set up quartz to run depending on the profile. I am using an integration test to make sure that each profile is getting the scheduler started (or not), but I am checking a prof...
Epifaniaepifano asked 29/7, 2020 at 19:46

© 2022 - 2024 — McMap. All rights reserved.