返回首页

Questions tagged [spring-boot]

Spring Boot is a framework intend to easily create Spring-powered, production-grade applications and services with the absolute minimum fuss. It takes an opinionated view of the Spring platform designed to work for new and experienced users of Spring.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

model.addAttribute() For Each Loop

I'm just starting to get my feet wet in Spring MVC. I'm consuming an external crypto currency API. I'm trying to use a for each loop to iterate over a JSON response to insert each value into the model ...
0
votes
0answers
10 views

Knative Eventing KafkaSource issue

I’ve got an issue with Knative Eventing and I would like to have your help as I am fresh about it. I am using Knative v0.10.0, minikube v1.5.2, Docker v19.03.1 and Kafka 2.3.1 (used as the source of ...
0
votes
0answers
7 views

Implement LetsEncrypt in Spring Boot app that is being pulled by docker

I am trying to implement LetsEncrypt on Spring Boot app. I am using docker to deploy, I am creating a docker image locally, pushing it to docker hub and then running it in Ubuntu using this docker ...
0
votes
0answers
5 views

Error “TestEngine with ID 'junit-vintage' failed to discover tests” with Spring Boot 2.2

I have a simple app using Spring Boot and Junit 5: When using Spring Boot 2.1 (e.g, 2.1.8 or 2.1.12), my unit tests run smoothly When using Spring Boot 2.2 (e.g., 2.2.2.RELEASE or 2.3.2.RELEASE) my ...
0
votes
1answer
8 views

Inject collection name in @Document from spring data mongodb in using a property from application.yml

I'd like to name my collection name from a Mongo Collection in using a property from application.yml. For instance, if i got that file : application.yml spring.data.mongodb.person-collection: ...
0
votes
1answer
18 views

Disabling Kafka Listeners for a particular Spring Boot test

How to disable @KafkaListener instances in @SpringBootTest tests in applications with Spring Boot (2.2+) and Spring Kafka (2.4+)? The goal is to disable Kafka listeners in particular tests, so that ...
0
votes
0answers
7 views

Unsatisfied dependency expressed through field 'jdbc'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException

*org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'heloworld': Unsatisfied dependency expressed through field 'jdbc'; nested exception is org....
0
votes
0answers
8 views

How to have different Hikari configurations for different datasources in spring-boot?

I want to have different parameter configurations like this: spring: cassandra-datasource: hikari: poolName: CassandraHikari auto-commit: false maximumPoolSize: ...
1
vote
0answers
12 views

Geting list of protobuf message objects from the SpringBoot

I want to get a list of protobuf message objects from the Spring boot app. I did manage to get a single protobuf message object from the app but getting a list of them throws exception. ... 2020-01-...
0
votes
0answers
7 views

Spring Boot Reactor Netty Thread Pool

Spring Boot Reactor Netty Thread Pool From what I have read online about Netty thread pool, the default number of thread pool is equal to 2 * no of processor cores. Now from what I've read there's ...
1
vote
1answer
16 views

What kind of test shall I use in my spring project(and am I doing it right)?

My project is a simple management system for shop which is connected to MySQL database. I only have JUnit test like this one(is this test written correctly?): @RunWith(SpringRunner.class) @...
0
votes
0answers
13 views

Jenkins “Docker Build and Publish” step failed due to error during connect: Post http://<docker host uri>:2376/v1.29 EOF

I tried to build docker image using Jenkins "Docker Build and Publish" plugin in windows 10 machine.For that i pulled jenkins image from docker. My requirement is, On top that jenkins image i need to ...
0
votes
2answers
29 views

Spring Boot test API endpoint with unit testing should return 404 instead of 400

I have the following controller on my Spring Boot application, which is connected to a MongoDB: @RestController @RequestMapping("/experts") class ExpertController { @Autowired private ...
0
votes
0answers
9 views

Spring Boot DataJpaTest (for Repositories) fail with java.lang.IllegalStateException: Failed to load ApplicationContext

I want to test the Repository-Layer of my SpringBootApplication. I used the following Articel: http://www.baeldung.com/spring-boot-testing#integration-testing-with-datajpatest but there's a problem ...
0
votes
0answers
11 views

What is the default setting value of SessionCookieConfig in Spring Boot, and how does it be set?

I am trying to configure my custom DefaultCookieSerializer in spring-session, the only property that i want to set is sameSite, and i want all the other setting use the "default" value. So I read some ...
0
votes
1answer
16 views

Spring boot form data request mapping with multiple files and spring params

How should I map form data request with multiple files and string params? The request looks below, user can upload multiple files and each file belongs to user(array of user data in data param, in ...
1
vote
0answers
13 views

Structured Logging with Application Insights for Spring Boot application

Does anyone know how to configure structured logging for Application Insights from Microsoft Azure working with a Spring Boot app? It works for json logging to the consol but not for log analytics ...
0
votes
1answer
23 views

difference between spring cache and hibernate second level cache? [closed]

I would like to use caching for master data (no need of expiring it) in my spring boot application. We have spring cache and hibernate second level cache. What is the difference between spring cache ...
0
votes
0answers
16 views

Configuring connection pool, using Hikari in Spring Boot 2 with multiple databases

I am using spring boot 2, I am connecting with two databases (postgres and cassandra). I am also using hikari. My problem is that I need to configure two connection pools independently. If I change ...
0
votes
0answers
4 views

Getting exception while sending soap request from springboot: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?;

I am getting an exception while sending soap request to third party application, and in the code nowhere i m setting the content type for Soap request. I tried to print the soap request before ...
0
votes
0answers
22 views

Spring boot with angular login works but not persisting the authentication

I have a spring boot 2.2.4 API with spring security and im doing my own custom login form i manage to authenticate correctly using the framework but later on on other requests when i try to extract ...
0
votes
0answers
8 views

Need help in creating jaspersoft report with passing a nested Java Object

I am using Jaspersoft Studio to create a report using a POJO in Spring Boot. This is my class: public class employee { String name; String id; List<Department> department; } ...
-1
votes
0answers
18 views

Spring microservices: send file to another microservice

I have two microservices: M1 and M2. M1 has a file containing a machine learning model generate with pickle and I have to send the file to M2 which in turn has to save the file in the file system. ...
1
vote
1answer
21 views

Springboot shutdown hook not working with Windows TaskKill

I have an Apache Camel Spring Boot Java 8 app that runs on Windows 10. It shuts down gracefully when CTRL-C is pressed, although sometimes I have to press it twice. But when using TaskKill, the answer ...
0
votes
0answers
15 views

Spring Boot JdbcTemplate update with KeyHolder has no key returned for UUID in MySQL

I am migrating PostgreSQL database to MySQL and I stumbled on issue with the UUID table IDs. PostgreSQL CREATE TABLE book ( id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), title varchar(255) NOT ...
1
vote
2answers
24 views

Join Two Tables without foreign keys in Spring Boot with similar Ids

Here I have two tables; both have IDs as primary keys. I want to know how to join these tables without foreign keys, based on their IDs. What should be the service implementation and what should be in ...
0
votes
0answers
8 views

echache 3 persistence cache detroyed on application restart

next problem: I configured jpa hibernation and ehcache 3.6 to use persistence cache (always on disc) because I want to use cache as long-time solution if database fails. the cache is up and running, ...
0
votes
1answer
16 views

Start temporary mysql container when running tests in Spring Boot

I am looking for a way to start a mysql container to be used only for my tests when run from Intellij. I have already configured docker-maven plugin for spring boot that will start the container when ...
3
votes
3answers
54 views

Why and When use @Inject instead of @Autowired in Spring? [duplicate]

Since Spring 3.0, Spring supports the standard JSR 330: Dependency Injection for Java. In a Spring 3 application, you can use @Inject instead of Spring’s @Autowired to inject a bean. @Named instead ...
0
votes
4answers
28 views

“Missing URI template variable 'teamLeadId' for method parameter of type Long”

I'm trying to get teamLeadId and trying to pass it in the list but it is showing as missing URI template variable! Why this is happening? @GetMapping(value = "pppp/{id}" , produces =MediaType....
2
votes
0answers
17 views

How to integrate spring security authentication using public key in multi-module project in spring boot?

My project is multi-module base. like, > e-commerce > auth-service > .../AuthService.java > pom.xml > category-product-service > .../...
0
votes
0answers
10 views

Why predicate field in RouterFunctions.DefaultRouterFunction<T extends ServerResponse> class gets DefaultErrorWebExceptionHandler?

I am using 'org.springdoc:springdoc-openapi-webflux-ui:1.2.28' library to show swagger UI API documentation in my spring-boot app. http://localhost:8080/swagger-ui.html does not work, it returns: ...
0
votes
0answers
13 views

Thymeleaf + Spring boot how to avoid creating an instance with a GET request

Learning Spring and stumbled upon a misunderstanding There is a form with two fields "name" and "age" when sending which a User object is created and placed in a list that is then displayed on the ...
0
votes
0answers
9 views

How to measure cache memory of Spring Boot Cacheable?

We are adding Caching to spring boot application as per the following link: http://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-caching How to view ...
0
votes
0answers
13 views

Failed to bind properties clientid to OAuth2ClientProperties$Registration

I am working on a spring boot app in order to communicate with another secured API. For that, I implement a OAuth2RestTemplate with the following properties but it failed when I run the application. @...
0
votes
2answers
22 views

How do I set the environment for spring.datasource on a spring-boot container using a Kubernetes YAML file ? Is it the same as Docker YAML?

So the other day I just learned about Docker and I could use in my Docker-Compose YAML file something like: environment: - spring.datasource.url=jdbc:postgresql://192.168.100.100/my_database ...
0
votes
2answers
38 views

How to Send Emojis using RestTemplate in Spring Boot?

My requirement is to send JSON data from service (A) to another service (B), in this case, I am sending emojis in JSON using Spring Boot RestTemplate. If I send a request from A to B, in the service B ...
0
votes
1answer
48 views

JSP does not render java list in Spring Boot 2

I have a simple java app in Spring Boot 2 with JSP. I use h2 database for testing data. It works fine but JSP does not render the list data from the controller. The list in JSP is empty, while in the ...
0
votes
0answers
13 views

@Mapping @Mapper Error No source parameter(s) exists

I have been shifting my project from spring to Spring Boot and introducing embedded tomcat there were some adaptations i have to do Only issue i am facing in my Old project i have Mapper interface. ...
0
votes
1answer
21 views

Spring Boot application is ignoring hikaricp config

I'm new to stackoverflow, but read tons of posts here and now stuck.my application.properties is read, but the portion for configuring hikaricp is ignored/has no effect. I read http://www....
-1
votes
0answers
35 views

How to delete child class by child id in Springboot mongo template

Getting error while trying to delete groupusers class by user id in all groups in mongotemplate Spring boot application public class Group { private UUID Id; private List<GroupUsers> ...
3
votes
0answers
37 views

Create Commenting system backend server with JAVA Spring Boot [closed]

I would like to implement a commenting system with JAVA Backend API server which should have the following features. User can post any message or image Any users can put their comments on their own ...
0
votes
2answers
36 views

how to get random port for configured listener in spring boot

I am able to run this port randomly while making Server.http.port=0 in @SpringBootTest using properties attribute but how to get random value of server.http.port property? @Configuration public ...
-2
votes
0answers
24 views

API Gateway configuration for spring Application

I require an API Gateway that acts as an entry point for another microservice. I need to route calls from one service to another. Configuration and dependencies required for my gradle project Tried ...
0
votes
1answer
18 views

Is there any advantage using UserDetailsService of Spring Security, when setting membership with JWT?

I'm applying JWT to authenticate the requests. Parsing and Validating works in my Spring Cloud Gateway. I made a custom filter on SecurityWebFilterChain, which parse and validate the JWT in request ...
0
votes
0answers
11 views

Get data from multiple tables using one Mapping Table in Spring Boot

Procedure.java @Entity @Table(name = "procedures") @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" }) public class Procedure implements Serializable { private static final long ...
3
votes
1answer
24 views

Java, Springboot, MongoDB extend SimpleMongoRepository (2020)

I've found many problems with this here in Stackoverflow. But they are all in few years back. Hoping to find an updated solution. I'm Extending SimpleMongoRepository in my own class to add some ...
0
votes
0answers
4 views

tlsClientParameters contains keystore password with special character ''+" and it gives error

I am using Apache CXF endpoint with Http Conduit xml for keystore certificate and password with proxy settings. It is used for consuming SOAP webservice. But my certificate contains some special ...
-2
votes
1answer
28 views

Call paginated REST request in spring boot

I'm building a spring boot application that needs to make REST call which has pagination implemented, like: http://host/api/getlist?p=1&ps=100 where p is page number & ps is page size. The ...
0
votes
0answers
21 views

react-admin populating list with same element

I'm trying to create a nice admin dash-board with react-admin. As I'm using Spring in my back-end, I'm sending data like this : @GetMapping("admin/user") ResponseEntity<List<User> &...

返回首页
杏彩计划 杏彩官网 杏彩APP 杏彩走势图 杏彩下载 杏彩官方 杏彩网站 杏彩怎么玩 杏彩官方 杏彩靠谱吗 杏彩代理 杏彩骗局 杏彩投注 杏彩倍率 杏彩开奖 杏彩漏洞