NoClassDefFoundError and ClassNotFoundException

I am using Eclipse and I have configured all the jars required for Spring Framework, it don't show any compilation error. But, when I run my main function(Test Class) it populates me this error. Am I missing something here? Please help me, could not ...
more »

2017-02-26 21:02 (1) Answers

Java to Jackson Serialization : BigDecimal field

Is there any way to prevent Jackson from auto truncating the leading zeros in a BigDecimal without converting the value to String while Serializing? I need to achieve this as the input type is a number in the HTML. I tried using Custom Serializer...
more »

2017-02-17 15:02 (0) Answers

Spring MVC 4 + Jackson + LocalDate

I am using Spring MVC 4 with Jackson API for databinding and I am having some issues while using Java 8 Dates, like LocalDate and LocalTime. Here is my Ajax: var response = $.ajax({ url: 'parcela', method: 'POST', data: { formaPagamentoPrazo: t...
more »

2017-02-13 18:02 (1) Answers

Use custom jackson mapper on spring boot endpoints

I want to use different jackson ObjectMapper instance ( instead of the one used on other mapped urls ) on endpoints derived from AbstractEndpoints. To clarify the question, I don't want to change or customise the object mapper which is used by diff...
more »

2017-02-10 14:02 (2) Answers

Why the POST request becomes a GET request?

When I use jQuery's $.ajax() or $.post() method to send form information to server, the 'data' string is added to the end of the url. Why the POST request becomes a GET request? The form code shown below <form role="form" class="form-horizontal"&...
more »

2017-01-20 08:01 (1) Answers

Spring MVC bind on a typed field

I have a Spring MVC controller like this: @RequestMapping(value = "/search", method = RequestMethod.GET) @ResponseBody public Object grid(Search<MyFilter> search){ ... } My Search object is like: public class Search<...
more »

2017-01-12 17:01 (2) Answers

Spring and Jackson: set json ignore dynamically

I have some JPA models: "Category" and "Article": @Entity @Table(name = "categories") public class Category { private int id; private String caption; private Category parent; private List<Category> childrenList; @Id @GeneratedValue(strategy =...
more »

2017-01-04 22:01 (2) Answers

Spring boot mvc async execution

I'm trying to execute simplest async REST controller using java.util.concurrent.Callable: @RequestMapping("/AsyncRequest") public Callable asyncRequest() { return () -> { Thread.sleep(3000); return "reply"; }; } Then I r...
more »

2016-12-27 20:12 (1) Answers

Serialize model without relation

I have two models: @Entity class ModelA { ... @OneToMany(mappedBy = "modelA") @JsonManagedReference private List<ModelB> modelBs = new ArrayList<ModelB>(); ... } @Entity class ModelB { ... @ManyToOne @JoinColumn(name =...
more »

2016-12-24 00:12 (1) Answers