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

-1
votes
2answers
17 views

Securing endpoints in Spring Boot by rights/roles

@RestController public class AccountController { @PermitAll @RequestMapping(value = "/test") public ResponseEntity<String> test() { // ... } @RolesAllowed("ROLE_ADM
0
votes
0answers
35 views

CrudRepository findById returns null mysql

I have a Databaseintem, and I have as Id a string. I created an ItemRepository and declared findById, the entry is in the database, but I get null on findById. import org.springframework.data.reposit
0
votes
3answers
17 views

SpringBoot 1.5.2:Required request body is missing when i make PUT RequestMethod

When i want to test REST application,i try to write a test code segment like below: Controller Code: import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.*;
0
votes
0answers
13 views

Spring data issue with multiple OneToOne Columns

Am working on an application and am currently focusing on 3 MySql database tables. One of the OneToOne table joins appears to be using the index of table 2 instead of the table I have the OneToOne ann
-2
votes
1answers
14 views

Create a Planning table itext

I'm trying to create a planning table using iText 7 and my database. The table must be like this: I have a list of objects, and these objects contain all data that I want put inside this table. Bu
0
votes
0answers
8 views

Running Spring boot app from changed project location in Eclipse

I have developed a spring boot application and want to deploy it my local bosh lite CF installation The app was running fine till i moved the project to a local git folder location. So basically now
4
votes
4answers
6498 views

Spring security logout handling

According to Spring Security 4.0.0 document: 4.2.4 Logout Handling The logout element adds support for logging out by navigating to a particular URL. The default logout URL is /logout, but
-1
votes
1answers
8 views

Server required in eclipse for spring boot

I am new to spring boot and I would want to know the basics of it. I am creating a project with jHipster. When I install gulp on my system I can see the project running at port 9000. I however want t
-1
votes
0answers
7 views

Deploy Spring App on Remote server

I have success working application on spring security , seccess on local Tomca. But after deploy on remote server don't work authentication. I guess cause in changed paths... local server: localhost
0
votes
1answers
61 views

Validate Json Request Schema

So I have this Controller class that contain this method: @RequestMapping(value = "/x", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_
0
votes
0answers
6 views

Start the application with jaxws:client even whenthe web service is unavailable

I have an application with JAX-WS client. <jaxws:client name="http://XXXXXX" wsdlLocation="YYYYY.wsdl" createdFromAPI="true"> <jaxws:properties> &l
-6
votes
0answers
38 views

I just got my first job as a java engineer, what do I do?

I just got my first job as a java enginner. I have a little work experience and learned things including java of course, spring, springmvc, mybatis, javascript, jquery, and a bit of other frameworks s
1
votes
0answers
55 views

Logging SQL statements in Spring Boot + jdbi

I'm using datasource with DBI: @Autowired DataSource dataSource; @Bean public DBI dbiBean() { DBI dbi = new DBI(dataSource); return dbi; } I have no idea how to configure logging framework
0
votes
2answers
23 views

Sending a MultipartFile as a Request Param to REST server using Angular2

I need to upload a photo to the server which has been written using Spring Boot. For the front end which sends the request I use Angular2. This is my API which accepts the HTTP request. It works fine
-1
votes
2answers
15 views

How to send a logout message to remote user?

I have a project builded on java2se, spring, gradle and extjs. I have to implement ability for admin to log out remoted users. I have done this by using method SessionInformation.expireNow(). But addi
1
votes
1answers
135 views

Parsing JSON to POJO with LocalDateTime using Jackson "Unexpected token (START_OBJECT), expected VALUE_STRING: Expected array or string."

I have read many postings on here on JSON parsing to Java objects and have had my parsing working just fine until I introduced LocalDateTime. I have tried to using the Java 8 parser, the JSR310 modul
-1
votes
0answers
9 views

java.lang.ClassCastException: com.controller.SenderController cannot be cast to org.springframework.web.method.HandlerMethod

Here i am getting ClassCastException when i am using HandlerMethod hm = (HandlerMethod) handler; Can anybody help me to resolve this? I created one Annotation to use as Filter. @Target(ElementType.ME
12
votes
1answers
8811 views

No session repository could be auto-configured, check your configuration (session store type is 'null')

What does this spring boot start up error mean? 2016-07-04 21:53:53 [restartedMain] ERROR o.s.boot.SpringApplication - Application startup failed org.springframework.beans.factory.BeanCreationExce
0
votes
0answers
18 views

java spring - How to retrieve the path from Download Box

I have a system which enables downloading of file.. And whenever users download, I will save the information including the path where he saved the file.. So is there a way, where I can get / retrieve
2
votes
4answers
84 views

Microservice Coupling

I'm building a new application with microservice concepts, but I don't know how to communicate with another microservice without coupling. Here is my scenario. I want to show a graphic bar about my s
-1
votes
0answers
9 views

dubbo consumer(springMVC) can't find interface

maven project ,has three module: API,Consumer,Provider;API is interface, and Provider implements API;also Provider can init successful, but when i start Consumer with tomcat ,its error。警告: FactoryBe
2
votes
0answers
18 views

Testing MockRestServiceServer spring-test with multipart request

Recently I've started to use Spring's MockRestServiceServer to verify my RestTemplate based requests in tests. When its used for simple get/post request - all good, however, I couldn't figure out how
0
votes
1answers
50 views

How to upload image and save it to my current workspace?

I try to create my own eshop and I would like when I am admin to imaga photo for the items and this image would be saved on my current workspace. So when the users search for an item they can see imag
0
votes
0answers
10 views

Could spring cloud config server using different ssh key to connect to different git repo during running time?

I have one spring cloud config server and two spring cloud config clients(ClientA and ClientB). And both of clients connect to this one server. application.properties on server side: spring.
28
votes
4answers
106537 views

spring cron expression for every after 30 minutes

I have following spring job to run every after 30 minutes please check my following cron express is that correct to trigger every after 30 minutes. "0 0 0 * * 30" <bean id="autoWeblogPingTrigger"
1
votes
0answers
36 views

maintain session variables in server side for restful web services in java

This is my first post on StackOverflow, so please forgive me if I wrote something wrong. I found this post useful If REST applications are supposed to be stateless, how do you manage sessions?. in m
6
votes
2answers
6164 views

Implement converters for entities with Java Generics

I'm working on JSF project with Spring and Hibernate which among other things has a number of Converters that follow the same pattern: getAsObject receives the string representation of the object i
0
votes
0answers
8 views

How to use cursor using spring data mongodb for below function?

The below is a mongodb function, I want to convert the same in java spring data mongodb: regExp = /_index/; db.getCollectionNames().filter(function(name) { return name.match(regExp);
1
votes
1answers
29 views

How to change getRealPath("/") path from .metadata to WEB-INF

I am uploading image files from application, now I want to save them in WEB-INF, but eclipse is saving it in .metadata folder .metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps. Please le
0
votes
0answers
17 views

null in annotation RestController with method Post

I ran a Spring project with Apache tomcat7 in Windows Server(It worked Normally), recently change the OS to CentOS7(for resource issue). Have 1 Big Problem with Conversion to Linux. It install CentOS