Spring at StackOverflow

Welcome to our StackOverflow page, where we maintain a list of StackOverflow tags that our engineering team monitors and participates in. If you are a previous forum.spring.io user, please read the blog post about the change or visit the read-only archive.

Active questions on StackOverflow

0
votes
3answers
14 views

How to get the path of the document inside .jar in spring boot?

I'm running spring boot application with a jar file. This application sends a mail alond with attachment. The attachment is the part of the jar file. I'm using the code below to fetch the attachment
2
votes
0answers
37 views

Spring REST API as a pipe to another API return JSON

I trying to write an API (a) that function as a pipe to another Spring API (b). The object that returns API (b) is quite big and I want to just serve it back through API (a), as a JSON. In the Contro
2
votes
1answers
30 views

how to create a connection pool/only once for a third party Application?

I'm using JAVA/Spring MVC and I need to make a Connection Pool for a Third Party Application integration in my application becouse when i try to connect it multiple time my application and server Syst
0
votes
1answers
10 views

search with multiple column in MongoDB, JAVA Spring

I tried Page<Session> findBySessionIdOrUserIDContains(String session_id_search_key, String user_id_search_key, Pageable pageable); but not working. I need page response so it will be good if
0
votes
1answers
11 views

Showing specific content for anonymous users with Thymeleaf Security

I'm struggling with the following. I have a nav-bar and i want to show/hide specific content depending on whether the user is anonymous/role_user/role_admin. Here is my html: <html lang="en" x
1
votes
3answers
28 views

Set size limit for request param

Currently I have an API like this: @GetMapping(/user/{id}) public ResponseEntity<MyClass> getById(@PathVariable @Max(value = Long.MAX_VALUE, message= ID_LENGTH_EXCEED_MESSAGE) Long id)
0
votes
1answers
17 views

Using localhost outside local network

I built a server for my personal needs like cloud storage etc. I don't want to buy a domain since i am just running this server on my localhost with 1tb hdd and raspberry pi. How can I access my local
1
votes
1answers
173 views

Spring boot activemq using pooledConnectionFactory not working

I am developing on Spring boot activemq, using pooledConnectionFactory, already set spring.activemq.pool.enabled=true in application.properties. I already created a PooledConnectionFactory, but what
0
votes
0answers
18 views

Parsing an XML in Java Spring

It's a really simple question but which I have no quick answer to it and I need help : I call a service that returns this XML body and need to parse it and get the element's values but for some reason
0
votes
1answers
12 views

Including css in spring based project with vaadin

Trying to include simple css file to a vaadin route Using spring boot and have a maven project. When i load the page on the client i get this error: Refused to apply style from 'http://localhost:808
2
votes
1answers
31 views

Inject list of Spring properties in annotation

I want to map REST endpoints dynamically to a RestController. I'd like to configure the endpoints as properties. My RestController looks like this @RestController public class MyRestController {
1
votes
1answers
21 views

How to expose multiple function endpoints with Spring Cloud Function?

I have a basic Spring Cloud Function application with two declared functions "lowercase" and "uppercase". If I create the application as a normal @SpringBootApplication and annotate both functions as
0
votes
0answers
18 views

How to convert mysql join query using criteria in hibernate

I want to convert the below MySql query to hibernate using criteria. tbl_state and tbl_country are the tables that I want to join where tbl_state and tbl_country has a common field country_id. se
0
votes
0answers
12 views

Customize Dependency Versions in Spring boot

I want to use Quartz 2 dependency with spring 1.5.2.RELEASE There I want to override the parent spring pom dependency for the quartz dependency only. I tried to do this : <properties> &lt
0
votes
1answers
31 views

Can't send email overseas via SMTP, Java

I'm confused and stuck in my project. I want to send email via SMTP JAVA to an overseas email address, but I'm getting a timeout message. I don't know why. My configuration xml: <beans xmln
-1
votes
0answers
8 views

Spring Boot jar library autowired error in other project

I have done a sample maven jar to update database. If i just run in the same project. it is work. But i export a jar for other project, i will the error. Would you like to teach me how to fix it? th
0
votes
0answers
6 views

spring-social: ProviderSignInController: Why signIn(...) with POST only?

Is there a specific reason why a user sign-in with {providerId} can only be initiated with a POST request (to /signin/{providerId})? Why not with a GET request?
0
votes
0answers
9 views

Failure tolerance not working as expected in Springboot's batch process

I'm developing an Springboot's batch process, which should be tolerance to a single exception (OptimisticLockingFailureException), and do not tolerance to any other kind of exception. For this reason,
0
votes
0answers
20 views

Session timeout in Java (with Spring Boot and Hazelcast)

I have a java application built with Spring Boot 1.5.13, and I don't manage to set the session timeout to 60 minutes. I discovered that the default session timeout is set by Spring to 30 minutes. On t
0
votes
1answers
85 views

Authenticate my spring boot app using a restful login api

Hi guys first of all don't downrate my Question cause i have searched everywhere, but couldn't find a clear implementation! But still some people don't care and keep downrating my question... Im dev
5
votes
3answers
22352 views

Spring transaction: rollback on Exception or Throwable

I wonder whether it makes sense to use instead of @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) to use Throwable @Transactional(propagation = Propagation.REQUI
0
votes
0answers
16 views

How to pull correct JOOQ version with Spring Boot and Gradle?

So according to the gradle jooq plugin readme: Defining the jOOQ version when the Spring boot plugin is applied When applying the spring-boot-gradle-plugin, it is not sufficient to declared the
1
votes
1answers
52 views

Redis Session with Java Spring boot

I am trying to save my session instances withing the Redis server ruining on local host. When I start the application I am getting a error massage and application wont start. It looks like the class
2
votes
2answers
6410 views

Spring Data Mongo - Query methods and Distinct field

I'm currently working on a project using Spring Data Mongo. My repository is just an interface extending MongoRepository. I would like to add a custom query method in order to retrieve all distinct va
0
votes
0answers
23 views

Spring boot + JPA dynamic datasource

I have a situation, where I need to create a db connection based on user input and this created connection should be used for all transactions till that particular user logs out. I need to do this in
0
votes
3answers
1603 views

Inferred type 'S' for type parameter 'S' is not within its bound; should extend 'ua.com.store.entity.Country

I have a problem with my CountryServiceImpl,when I want realize method findOne in CountryServiceImpl it tells me "Inferred type 'S' for type parameter 'S' is not within its bound; should extend 'ua.co
22
votes
8answers
34013 views

How to run bootRun with spring profile via gradle task

I'm trying to set up gradle to launch the bootRun process with various spring profiles enabled. My current bootRun configuration looks like: bootRun { // pass command line options from gradle t
-1
votes
1answers
34 views

Unable to create criteria query with dynamic value

i am trying to create criteria query with dynamic fields CriteriaBuilder cb = entityManager.getCriteriaBuilder(); javax.persistence.criteria.CriteriaQuery cq = cb.createQuery(); Root<Abc> abc =
0
votes
0answers
8 views

Tomcat SSO Legacy apps + New app with Spring security

we are facing an issue and want to know if somebody has the same problem and solved it without using CAS. We have several legacy webapps in Tomcat, using Catalina SSO and JAAS for login, so when logg
2
votes
0answers
12 views

How to test Hibernate Configuration Class which is Java Annotated in SpringBoot using Mockito?

I am working on a SPringBoot+Hibernate+REST project using Mysql DB. I want to know how I can Unit Test the below class. I have been told that Mocking is the best way to go about it. I think this is re