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
2answers
12 views

Why does spring rest controller return unauthorized when no security has been set

I have start a spring boot application. I added a rest controller like this @RestController public class EmailController { @RequestMapping(value = "/2", method = RequestMethod.GET) public in
0
votes
1answers
10 views

Where does Spring Data REST build Exception JSON reply?

I'm using Spring Boot 1.5.3, Spring Data REST, Spring HATEOAS, Hibernate. Spring Data REST manage in a pretty way exceptions, returning a well formatted JSON object like this: { "timestamp":
0
votes
1answers
25 views

Java wrapper class with dynamic List type

I need to create some kind of response wrapper (in Rest controller). All mappings should return some necessary fields and some field specific to each class. For example I have a mapping that returns
0
votes
0answers
34 views

How to use all AspectJ pointcut designators on a Spring based application?

I have a Spring project managed by Maven. Instead of using execution pointcut designator like the following: @Before("execution(* my.app.TestUtil.myStaticClass(..))") public void logBeforeTestUtil(Jo
0
votes
0answers
11 views

Send Multipartfile from webapp controller to rest controller

Webapp controller is as below. Need to upload a file and parse the contents and store in database at service side form web app to rest client controller not working. @RequestMapping(value = "/uploadF
0
votes
0answers
29 views

Jdbc Template set List Object properties with row mapper

I was reading this post : JDBCTemplate set nested POJO with BeanPropertyRowMapper This answer seems great : JDBCTemplate set nested POJO with BeanPropertyRowMapper However another situation came
0
votes
0answers
12 views

Changeable Schema for a Specific Entity with JPA and Spring

I'm using Spring and JPA repositories, with multiple database schemas for different entities, and configuring each of them with the proper values and independent beans: @Configuration @EnableJpaRepos
0
votes
1answers
14 views

spring mvc when using *.jsp in urlpattern in web.xml file shows 404 and in console noHandlerFound

<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/
0
votes
1answers
227 views

Is there a way to use @Query to return a MongoDB $sum result?

I'm pretty new to both MongoDB and StackOverflow (as a questioner). I've seen a great response for how to return a MongoDB "count" projection from a Spring repository using the @Query annotation (Coun
6
votes
4answers
6222 views

Print all the Spring beans that are loaded - Spring Boot

How can I get to know names of all the beans that are loaded as part of my spring boot app? I would like have some code in main method to print the details of beans that are loaded once the server is
1
votes
1answers
401 views

Conditional query with spring mongotemplate

I want to use conditional query. Here is my query db.projects.aggregate([ { "$group": { "_id": "$iecode", "treatmentArms": { "$first": "$evaluationDTOList" } } }, { "$unwind"
0
votes
1answers
22 views

Hibernate, No identifier specified for entity, For mapping String id

I use : mysql-connector-java 6.0.6 hibernate 5.2.10.Final spring 4.3.8.RELEASE Class code : public class PhoneNumber extends AbstractValue{ public static final int CELL_PHONE = 1, HOME_PHON
0
votes
2answers
299 views

Using @annotation in Spring AOP

I am using Spring AOP with aspectj-autoproxy. I use the @Around annotation to intercept certain classes and methods. @Around(value = "@annotation(counter)") This code should intercept methods annot
2
votes
1answers
23 views

CrudRepository generated a messed up Sql Request

I try to use CrudRepository on my work. And When the sql request appear on my log, It's just abnormal. The real table is 'AllDatabase.AllUserInfo' but the generated sql request look like 'all_user_
0
votes
0answers
11 views

Spring JpaRepository using EntityGraph returns null instead of Optional

Calling this method: @EntityGraph(attributePaths = "permissionGroups") Optional<User> findOneWithPermissionGroupsByLogin(String login); With non-exsisting user login returns null instead of
1
votes
1answers
61 views

Bind list or array to form in Thymleaf

On my website I have a few checkboxes each of them contains id in value attribute. After submitting form I'd like to have a list containing ids of checked checkboxes to be passed to controller. That's
0
votes
2answers
28 views

Can Spring JdbcTemplate connect to hive?

I am developing a java web project which is based on spring. And I want to use Spring JdbcTemplate to connect to hive. But when I tested my service, it came out this error message "org.springframe
0
votes
0answers
10 views

javax.management.InstanceNotFoundException: org.springframework.boot:type=Admin,name=SpringApplication at

I use hazelcast and atomikos. when application start it throws this exception but after a few minutes application starts. I couldn't solve this problem. I have tried to reconfigure hazelcast and atomi
2
votes
1answers
145 views

/tmp/tomcat-docbase is always created with a Spring Boot JAR (but not a WAR)

From STS I'm creating a standard Spring Boot 1.5.2 'Web' project. If you run this application you get two directories created - the normal 'base' directory and a 'tomcat-docbase' directory . . . 40
0
votes
2answers
421 views

Could not find or load main class BasicApp.Application

I am new to spring boot and was trying to create a very basic application on spring boot. But, I am getting this error while creating my application. Could not find or load main class BasicApp.Ap
1
votes
1answers
26 views

HTTP Status 500 - javax.servlet.ServletException: Servlet execution threw an exception

I'm developing dynamic java project using spring mvc and angularjs. This project is successfully running on Ubuntu system. But in windows this project is not running. I'm using tomcat 7. All the req
1
votes
3answers
27297 views

Spring BeanCreationException: cannot resolve reference to bean exception

I am trying the example application at the following web site: JSF 2, PrimeFaces 3, Spring 3 & Hibernate 4 Integration Project But I find that when running the project, I get: SEVERE: Excep
0
votes
0answers
13 views

Mybatis disconnected

Mybatis is in use. However, when I insert more than 1000, it takes a long time to solve the job and return, so the db connection is continuously disconnected. Is there a way around this? Thank you.
-9
votes
0answers
56 views

What kind of programming language is that?

Can anybody help me about what programming language that could be? let x = fun(y) -> y (x y) in x y let y = let rec x = fun (y) -> (y <= 0) || (not (y <= 1) && (x (y -2)))
0
votes
1answers
42 views

Java Spring session.getAttribute("test") is null

I have a problem with HttpSession, I do not have it I think I forget an Annotation or anything like this. Do I need anywhere to do a session.create() ? In UserController : @Controller public UserCo
0
votes
0answers
17 views

spring security using jwt token

We are designing an application which can be accessible via mobile app and Web Url. Mobile app will get data using exposed rest api (we are using CXF). For Web Url we are using spring MVC intern it wi
0
votes
2answers
13 views

what is the Difference between spring.profiles.active=production vs spring.profiles.active=local

When I try to run an spring boot application. There is a property available inapplication.properties file where it has the property spring.profiles.active=production. While search the details ab
0
votes
1answers
19 views

java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/Session;org.springframework.orm.hibernate4

When i try to integrate my web maven project with spring4.2.2release and hibernate4.2.0Final,I got the array below: 严重: Servlet.service() for servlet [jsp] in context with path [/ismdhust] threw exce
0
votes
0answers
14 views

How to upload multi-images from Android to Spring Server?

I want to upload multi-images from Android to Spring Server, using Retrofit2, but it is not working. I refer to this website: https://futurestud.io/tutorials/retrofit-2-how-to-upload-multiple-files-t
0
votes
1answers
19 views

spring data jpa to findbyId and optional params

I have to fetch the matching records of users by Id and also if the name and age matches. I wrote a query userRepository.findByUserIdAndOrNameOrAge(int id, name, age, pageable) But I am getting an ex