Newest 'spring-boot' Questions - Stack Overflow

Questions tagged [spring-boot]

Spring Boot makes it easy to create Spring-powered, production-grade applications and services with the absolute minimum fuss. It takes an opinionated view of the Spring platform so that new and existing users can quickly get to the bits they need.

0
votes
0answers
7 views

Taking only specific message from @RabbitListener

I have legacy system that send message to RabbitMQ. The system use only one queue : q.finance.invoice but it has two types of message, where the type of message is available on header. The first type ...
-1
votes
0answers
7 views

How to Display Map<Company,List<Document>> from Controller to JSP?

I want to display Map<Company, List<Document>> from the Controller to JSP, however, my code is not working as expected List<Company> company = companyService.getCompanyByDomain(...
0
votes
0answers
7 views

Is there any means to create swagger ui with openAPI 3.0 spec in spring boot kotlin?

I'm setting up swagger ui for spring-boot kotlin backend server with openAPI 3.0 specs. Days of researching but all I see is to create swagger 2 ui with springfox. Is there any means to create openAPI ...
-1
votes
0answers
13 views

ModuleNotFoundError: No module named 'train'

Call python method from Java spring boot using GraalVM, simple def is working, but Could not detect import def from another file. got an error "nested exception is org.graalvm.polyglot....
2
votes
0answers
18 views

How to read output file for collecting stats (post) processing

Summary I need to build a set of statistics during a Camel server in-modify-out process, and emit those statistics as one object (a single json log line). Those statistics need to include: ...
1
vote
1answer
11 views

Spring boot Zuul server logging

I just created simple Zuul Proxy at the front end for our microservices environment but now I wanted to log all the entries into the log file which went through the proxy. Do any properly which I ...
0
votes
0answers
6 views

How to instantiate FeatureManager in Togglz java library during autowire of bean

I am working on an application that uses spring boot and I am auto-wiring a bean which utilize the togglz library in the constructor. However, I am getting the following error: Could not find the ...
0
votes
1answer
23 views

Disable the Number to String automatic conversion in jackson

When I make a json request to a spring boot backend, Jackson is automatically converting numbers to strings. Is there a way to prevent that? For example: JSON { "numberAsString": 123 } JAVA ...
1
vote
0answers
17 views

What does maven'spring-cloud-security depency do in jhipster microservices?

When I was researching the microserives generated by jhipster, I found that the maven spring-cloud-security depency package was not used in Gateway. When I commented out spring-cloud-security depency, ...
-1
votes
0answers
7 views

how to map multiple table to insert one table and update other tables using spring data jpa

I have a table called Conflict which has a primary key called conflict_id, value coming from my UI. and I have tables Producer, Sales which also contains conflict_id and Producer contains Producer Id,...
0
votes
1answer
13 views

Shiro No SecurityManager accessible to the calling code

I am trying to integrate Spring Boot and Shiro. When I tried to call SecurityUtils.getSubject() in one of my controllers, an exception occurred: org.apache.shiro.UnavailableSecurityManagerException: ...
0
votes
0answers
17 views

Refresh/Load only newly changed value in cache

I am using Caffeine cache and in cache there are approx 7-8 Lakh records,while refreshing i don't want to refresh the hole cache because its takes 10-11 min to do. So is there any way to only refresh ...
0
votes
0answers
16 views

Losing HttpServletRequest object while dealing with exception in AOP for @Async method

I followed this and created Executor, Callable and ExecutorConfig exactly as described in the answer. Now I started getting HttpServletRequest object in AOP code but the object doesn't contain ...
0
votes
1answer
10 views

Default TaskExecutor implementation for Async event listeners

I am using an annotation-based event listener which I have also tagged as @Async. (See Asynchronous Listeners). Which TaskExecutor implementation is Spring using to serve these requests? The ...
0
votes
0answers
11 views

ClassifierCompositeItemWriter rollback on exception but data is partially committed to the database

I'm using a ClassifierCompositeItemWriter to insert different kinds of registers stored inside one fixed length flat file, and writing it into a postgres database with multiple JdbcBatchItemWriters ...
0
votes
0answers
9 views

Spring Security AuthenticationSuccessHandler and MockMvc

after successfully authetication i save autheticated user within a session. After that i retrieve a user within any controller with @SessionAttributes("user") Now i am trying to test it: @...
0
votes
0answers
10 views

Trying to run application locally, application is working fine in Cloud-dev environment but throwing 404 in cloud-stage

Application showing 404 not found in cloud-stage environment, request link seems to be fine enter image description here This is the error this is stage property
0
votes
0answers
17 views

How can I download different files from my REST API?

I have got a REST API which stores files. Now I would like to make the files downloadable from my API but I do not know how to make this. The files which the user could send to the user isn't specific,...
1
vote
2answers
23 views

JUnit How to assertTrue/Equals on a Optional and a object

How do I use assert.equals to test between a Optional and a Object? After debugging it shows the same values but my test still fails to pass. Returning error: at org.springframework.test.util....
0
votes
0answers
13 views

Cannot Override onBeforeConvert: “…have the same erasure, yet neither overrides the other”

I've been trying but failing to imitate a Baeldung article's walkthrough on how to trigger a save on a "child": an entity that is "contained" in another via Spring Boot's @DBRef annotation. In my case,...
0
votes
0answers
12 views

SQL Sever initial load failed in spring boot

I am trying to load the initial data to the database schema and data with the spring boot application. I am trying to test out the initial load for schema.sql and data.sql with spring boot and SQL ...
0
votes
1answer
10 views

Unable to return data from postgres using Spring and JPA

I created a postgresql database with a table, two columns, and some data. postgresql db I created a new spring package using start.spring.io. start.spring.io I imported the project into Eclipse and ...
1
vote
0answers
21 views

Swagger ui shows duplicate model variables

Swagger-ui shows duplicate model variables when in edit and none edit mode. This happens to every single model shown on the ui have duplicate model variable. Not sure if this is due to using kotlin ...
0
votes
0answers
16 views

NoClassDefFoundError caused by ClassNotFoundException in Spring Boot App w/ Gradle in Eclipse

I'm new to creating a web application using Spring Boot with Gradle and I've been getting along alright, then all of a sudden without knowledge of what's changed, I can't run it as a Spring Boot app ...
0
votes
1answer
23 views

Testing method with multiple bean dependency

In my test I need simply to test a method insertData : @Component public class DatabaseServiceImpl implements DatabaseService { @Autowired DataSource dataSource; @Override public ...
0
votes
0answers
20 views

How to fix 'NoSuchMessageException' when MessageSource#getMessage is called

I want to read a property in the messages.properties-File. But when I call messageSource.getMessage("property", null, Locale.getDefault()) I'm getting a NoSuchMessageException. I already tried to ...
1
vote
3answers
32 views

Spring Boot autowire field in singleton service/controller by request scoped bean

I have a singleton service class with an autowired field like: @Service public class MyService{ @Autowired private List<POJO> listWithObjectsForRequest; } the ...
0
votes
0answers
7 views

SpringBatch application is not up

Trying to create a Spring Batch job with the below configuration with SpringBoot project. Maven build was successful but application is not up to validate the endpoint defined for spring Batch. ...
1
vote
0answers
30 views

Calling external api from spring boot with multipart/form-data

I am working in a project where i need to get the data out of image using ocr. I am using ocr by third parties where I can upload file and get the data out of ocr. I need to call this API through ...
0
votes
2answers
18 views

Problem in fetching data of @ManyToOne field

I am not getting data of @ManyToOne field. @Entity public class UserDetail { @OneToMany(cascade = { CascadeType.ALL }) @JoinColumn(name = "user_id") @JsonIgnore private List<...
0
votes
0answers
13 views

Robo3t is able to execute find on a database but JavaDriver is not

I am writing a java code to do a simple search in a collection in MongoDB using Spring Boot with MongoRepository. I am getting the following error: com.mongodb.MongoQueryException: Query failed with ...
0
votes
0answers
9 views

Thymeleaf: How to fix updating @ManyToMany table

I have created a form using thymeleaf for updating books information. Authors and Book have a @ManyToMany relationship. The problem is that when I save my changes, the @ManytoMany table (Book_Authors) ...
0
votes
0answers
17 views

How do I use auth0 and swagger together in spring boot?

I am trying to use both Swagger and Auth0. Swagger alone is working fine when I'm hitting http://localhost:8080/swagger-ui. But, after configuring auth0. It is showing 403 Forbidden Error I'm using ...
0
votes
1answer
8 views

Relation return mappedBy reference an unknown target entity property

I have the problem with relations between Meal and MealGroup. Hibernate return me: "mappedBy reference an unknown target entity property". I have two entities: I tried remove @Join Column and ...
1
vote
1answer
7 views

Column of Map type in springBoot table

I have a Table in spring boot in which one column i want to be of Map type. Below is the model @Entity @Table(name = "media") public class Media { @NotBlank private String url; @Id @GeneratedValue(...
0
votes
0answers
12 views

Spring Boot 2 Actuator Httptrace Principal is null

I have a restful web application using spring boot 2, with the actuator, and spring security. While doing some testing, I was checking out the /httptrace path and realized that the principal was ...
1
vote
0answers
40 views

Curl 'GET' successfully, but Curl 'POST' unsuccessfully

I'm using Spring Boot + Rest + Spring Security (Basic Auth) as my back end API. I'm able to curl with GET, but i'm not able to curl with POST. I'm using application.property + ...
0
votes
1answer
12 views

Rest api header base versioning info to be kept in YAML file

I have achieved the header based rest Api versioning as shown in the below piece of code in my spring boot application in one of the controller but for that I have to annotate the same above the ...
0
votes
1answer
29 views

how to convert Data Transfer Object to Model in Spring boot?

i am new in Java Spring boot so I need to implement more and more articles, i have DTO ( Data Transfer Object ) to convert to Model and Model convert to DTO using modelMapper packages, but i got some ...
-1
votes
0answers
7 views

Why spring boot does not find GroovySystem?

I am using springboot project with batch with intellij. when I start to debug the project, gets the following error. What dependency am i missing? java.lang.NoClassDefFoundError: groovy/lang/...
0
votes
0answers
9 views

Is there a way that a mongo “collection count query execution” can be automated once we run in its client tool (Nosqlbooster or Robo3T)?

I came up with this situation where I want to see the updated count for a collection like on an every document insertion that happens from my spring batch code. Since with my code it does repeatedly ...
0
votes
1answer
33 views

Implement paging for certain type for rows

I want to implement pagination only for certain type of users. The table structure is: @Entity @Table(name = "users") public class Users implements Serializable { @Id @GeneratedValue(...
0
votes
0answers
17 views

Transient instance must be saved before current operation on a @ManytoOne field referencing a non id field

I'm having this classic problem, but I don't find anyone with the same exact problem anywhere. These are the two tables in question Prices OverrideCategory ______________ ...
-1
votes
0answers
11 views

How can I analyse java project in sonarqube only with project path

I am developing a spring boot web application which will analyse the java project provided the java project path to which analysis should be done...I need to get the analysis review of this project ...
0
votes
1answer
30 views

Spring RestTemplate GET request does not give correct response

When I perform a get request with RestTemplate, the server's response is not the same as what I get via a curl or in my browser I've tried playing with the URL encoding and logging the url to the ...
0
votes
0answers
8 views

Spring Boot Webflux Security - reading Principal in service class when writing tests

I am quite new to the Spring ecosystem in general and Webflux. There are 2 things that I am trying to figure out and cannot find any specifics about. My Setup: I am writing a Spring Boot 2 REST API ...
0
votes
0answers
15 views

JPA EntityManager Create Native Query not returning foreign key data

I have two Entities, TableA and TableB, with a many-to-many mapping between them. When I try to select all of table_b using a createNativeQuery I am able to get all table_b's data but I'm not able to ...
0
votes
0answers
9 views

Dynamically use different database based on previous lookup with AbstractRoutingDataSource

We will face high data volume on our mysql databases. To overcome problems with backups and ddl operations, we had the idea to store the data into multiple databases. Basically we will have a database ...
0
votes
0answers
9 views

how write a request sql native with springboot 2.1 and java 8?

I am trying to write the following native SQL query, but I have an error that I can not solve. i would like to write to request sql native ... i need your help :) AssignmentDao: ``@Repository ...
0
votes
0answers
11 views

JPA 2.0: OneToMany Unidirectional Cascade delete with Composite Primary key

I have created two entities those are have one-To-many relationship, that i have to delete child records when parent record was deleted. //following entities @IdClass(EmployeeKeys.class) @Entity @...