Questions tagged [spring-4]

Version 4.x of the Spring Framework

Use for general Spring related questions. This tag is for questions that are specific to versions 4.x only.

618 questions
3
votes
1 answer

Property mapping has wrong number of columns:

I'm using hibernate 4.3.7 with mysql. I'm unable to persist joda tiem in mysql. When I use this annotation @Type(type = "org.jadira.usertype.dateandtime.joda.PersistentDateTimeWithZone"), it throws this exception property mapping has wrong…
asma
  • 147
  • 1
  • 10
3
votes
1 answer

Spring MVC 4 Global Basic HTTP Authentication

I need to set up global basic HTTP authentication for a staging server. Nothing fancy. I just want to require username/password to access anything. I also would like to use only Java config. I've experimented with a lot of different solutions, but…
3
votes
1 answer

Rest Custom HTTP Message Converter Spring Boot 1.2.3

I want to create a custom of HttpMessageConverter using Rest, Json, Spring Boot 1.2.3 and Spring 4, However my custom HTTPMessageConverter its' never called. I have preformed the following steps : 1: Created a class that extends…
Kamal
  • 1,476
  • 1
  • 13
  • 21
3
votes
2 answers

How to turn on annotation driven validation in Spring 4?

I am using the annotation validation as below: public String processRegistration(@Valid Spitter spitter, Errors errors, Model model) { if (errors.hasErrors()) { return "registerForm"; } ... …
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
3
votes
1 answer

How to add a MediaType to the MappingJackson2HttpMessageConverter instead of the RestTemplate

My question is very similar to How to change MediaType for MappingJacksonHttpMessageConverter in OAuth2RestTemplate but different in many ways. I am using Spring 4 with SprintBoot. I want to use RestTemplate to query a Zimbra web services. The web…
ETL
  • 9,281
  • 3
  • 29
  • 28
3
votes
1 answer

Spring 4 RestController JSON: characteristics not acceptable according to the request "accept" headers

I am using spring 4.1.1.RELEASE and have included: jackson-core-asl 1.9.13 and jackson-mapper-asl 1.9.13 in pom to create a simple app with a RestController. Here is the repo: https://github.com/robikshrestha/samplespringrest.git Here is the failing…
coolscitist
  • 3,317
  • 8
  • 42
  • 59
3
votes
1 answer

Configure two @InitBinder to work with the same Model or Entity but for different @RequestMappings

I have a controller where works fine, It can register and update an entity, just how the following about to create the forms to save and update an entity respectively @RequestMapping(value="/registrar.htm", method=RequestMethod.GET) public String…
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
3
votes
3 answers

Error while Handling 404 error for Spring Boot REST application

I trying my hand out in Spring boot exception handling . I have created a REST application and the application works for all valid url. I am trying to handle the exceptions for invalid url. But if i try hitting the application with an invalid url…
Manu
  • 1,379
  • 6
  • 24
  • 53
3
votes
2 answers

configuration to encode Hibernate Validator customized error messages through Spring Framework

I am working with Spring (4.0.5) and Hibernate Validator (5.1.2.Final) I already have working the error messages through a .properties file, it works too about i18n. It in a standalone and testing (JUnit) environment, by the moment. I don't want…
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
3
votes
1 answer

Angular JS + Spring 4 : Upload File and Form Data

We are using Spring 4 (Annotation based configuration) and AngularJS for building our application. In one of the usecase, we need to upload a document. On submitting the form, we need to send the form data (apart from file uploaded file, there are…
Manjunath
  • 172
  • 1
  • 2
  • 18
3
votes
2 answers

What is the equivalent of destination-type from jms:listener-container in JavaConfig?

What is the equivalent of destination-type from jms:listener-container in JavaConfig? I have checked in the API these two following classes without results. DefaultMessageListenerContainer MessageListenerAdapter I am trying to create consumers for…
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
3
votes
1 answer

complete jms:listener migration to JavaConfig

Like the title says.. I have read this valuable How to add multiple JMS MessageListners in a single MessageListenerContainer for Spring Java Config link The author of that post is working through messageListenerContainer.setMessageListener(new…
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
3
votes
2 answers

Is Mybatis supported with Spring 4.x?

I tried mybatis-spring 1.2.2 with mybatis 3.2.5 and Spring version 4.1.0.Release and it appears like it is not supported. mybatis-spring 1.2.2 spring contains org.springframework.core.MethodParameter class however, getContainingClass() is not…
user3101143
  • 137
  • 1
  • 3
  • 10
3
votes
2 answers

Spring 4 LTW not compatible with 64 bit JVM and Tomcat

As part of moving to Java 8 and in honor of Spring 4, I thought I'd upgrade to all 64 bit code. This application runs perfectly on 32 bit but load time weaving does not work (in fact doesn't even load) on 64 bit. Specifics of the architecture: Java…
Terry
  • 911
  • 10
  • 26
3
votes
4 answers

Gradle: Spring 4 BOM dependencies

How to add Spring 4 BOM dependencies in Gradle configuration file? In Maven it could be done as mentioned here. Maven equivalent: org.springframework
Vikas Sharma
  • 1,235
  • 2
  • 27
  • 53