spring Questions

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

1

I'm working on a Spring Boot application that uses Spring WebFlux, and I'm trying to intercept WebClient requests and responses. Specifically, I need to capture both the headers and the request/res...

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

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

2

Following the getting started guide (https://resilience4j.readme.io/docs/getting-started-3) and the demo project (https://github.com/resilience4j/resilience4j-spring-boot2-demo) I wanted to test it...
Jealousy asked 20/5, 2020 at 15:32

3

How to set a connect/read timeout in the Spring's RestClient? This client has been added in the Spring Framework 6.1.
Shingly asked 29/2 at 20:45

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

1

I am creating a simple client-server demo using websockets. In this demo client can subscribe to different topics. Whenever server has anything to send, it will just send the message on the appropr...
Paperboard asked 24/3, 2015 at 10:59

6

I want to use JPA with Spring on Wildfly. I tried this configuration: application.properties: spring.jmx.enabled=false spring.datasource.jndi-name=java:/global/production spring.datasource.driver...
Bedraggled asked 25/7, 2018 at 7:34

3

Solved

In order to utilise the new WebClient API, I've included spring-webflux in my Intellij project. dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' compile 'org.spri...
Reseat asked 19/6, 2020 at 23: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

3

Solved

I've already checked several questions / answers regarding similar subjects, but can't find the proper answer for my case. I'm using Spring's RestTemplate but fails to get the response from a thir...
Hotien asked 27/7, 2016 at 13:44

7

INFORMATION NEEDED: I use Keycloak (Docker version) behind a Spring project. (The client side of this project is React and communication between client and backend is provided by REST services.) ...
Heathcote asked 7/3, 2019 at 13:10

8

I want to place the git repository in a folder directly above the classpath during the development stage of an application. Currently, I have this as my Spring Cloud git URI: spring.cloud.config....
Embank asked 14/12, 2018 at 21:48

8

Solved

I'm trying hystrix fallback method. On localhost:8082, customer-service is running which returns name of the customer. If the customer-service is down, fallback method should invoke. But it is not...
Otiliaotina asked 18/12, 2016 at 16:22

3

Solved

By Default, Spring Boot Application searches thymeleaf templates under classpath://templates How do we add one more resolver For E.g, We need to search templates from local directory like "c:\MyTe...
Gobbledegook asked 6/8, 2014 at 8:58

2

Solved

Currently, I am working on a project to upgrade it to Spring Boot 3, Spring 6, and Java 17. But I am facing an issue with HttpStatus. I have a method that returns HttpStatus.NO_CONTENT and HttpStat...
Mixedup asked 19/7, 2023 at 8:23

5

Solved

I have a spring-boot application that defines a mysql DataSource: spring.datasource.url=... spring.datasource.username=... spring.datasource.password=... I run the tool as command line applicati...
Yaakov asked 4/11, 2019 at 14:54

6

Create Maven project. File -> New Project -> Maven. Archetype do not indicate. Then everything is standard: GroupId and ArtifactId. The project is created with empty pom.xml I am trying to c...
Indiscretion asked 25/11, 2021 at 2:46

5

Context: We have a Spring Boot (2.3.1.RELEASE) web app It's written in Java 8 but running inside of a container with Java 11 (openjdk:11.0.6-jre-stretch). It has a DB connection and an upstream se...
Humdinger asked 12/11, 2020 at 19:41

7

Solved

i'm working on spring boot project and all works fine , now i want to build and run the app. in the application.properties file i set the property server.port = 8090 after building the project usin...
Afghanistan asked 26/6, 2017 at 11:29

5

I have a model: public class MyModel { @Id private Long id; private Long externalId; // Getters, setters } I'd like to use externalId as my resource identifier: @Configuration static class R...
Peer asked 22/7, 2017 at 9:7

3

Solved

When I added spring shell to project <dependency> <groupId>org.springframework.shell</groupId> <artifactId>spring-shell-starter</artifactId> <version>2.0.1...
Oosphere asked 22/2, 2020 at 13:5

© 2022 - 2024 — McMap. All rights reserved.