Spring @CacheEvict Behavior

I am trying to understand the behavior of @CacheEvict in Spring Cache Abstraction. Here is my sample application pom.xml <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache&...
more »

2017-10-04 07:10 (1) Answers

spring cache found but return no result

I am using Spring Framework Cache version 4.3.4.RELEASE. In my junit test, spring cache works as advertised. however when i put it into web application, it keeps returning with no result even the log shows Spring Cache found its cache. I am out of i...
more »

2017-10-04 05:10 (0) Answers

Spring Boot cache with ContentVersionStrategy

I'm using Spring Boot in a web project, and I wanted to use the static content cache feature. Using the ContentVersionStrategy with the following configuration in application.properties spring.resources.chain.enabled=true spring.resources.chain.cac...
more »

2017-10-03 23:10 (0) Answers

hibernate validator and WAS 8.5

I am also facing an issue with hibernate-validator 5.0.0 and WAS 8.5 . @safeHTML annotation does not work. There are no errors but the validations are not enforced. It works in TOMCAT but not in WAS 8.5. It's a Rest service using SPRING 4. @Req...
more »

2017-10-03 15:10 (0) Answers

What are additions in Swagger 2 over Swagger?

I am implementing swagger for REST layer documentation. Now swaggerfox has come up with swagger2. I am not able to distinguish new changes in swagger 2 than swagger. I have very plain simple documentation requirement. Is there any reference for that...
more »

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

Sending multiple objects in HTTP Request (Spring)

I'm currently "migrating" from SOAP to REST services. (legacy code) There are several methods that send objects in the request, the objects vary in type and number, I'd like to do something like this. public long getRelationship(@RequestBody Relati...
more »

2017-10-02 22:10 (1) Answers

Spring Rest Controller

I can't make spring serialize the response when results is array/list . So when I call clients from RestController it does return [{},{},{}], instead of real objects, all other methods works just fine. package com.test.Domain.Client; import javax.p...
more »

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

Thymeleaf get current url without base url

Is there a way in thymeleaf to get current url's portion after the base url and use it as a string for example in th:text? Example: http://www.example.com/payment-page/pay I want the /payment-page/pay or payment-page/pay portion. Thanks. ...
more »

2017-10-02 15:10 (1) Answers

Cache not working in spring boot application

I have a spring boot application with caching enabled and i have got 2 methods one method to save the data and the other method to retrieve the data. Please see the code below :- ContactServiceImpl.java @Service public class ContactServiceI...
more »

2017-10-01 20:10 (0) Answers

Spring Rest api and Spring Basic Security

Hello I am new in spring and spring security. currently i am working on rest api in spring. as per spring provide rest api. rest api are stateless so we can not create a session to rest api. because it's a stateless if we do so then it's against the ...
more »

2017-10-01 03:10 (1) Answers

Unable to send data to POST Service in Spring 4

I'm trying to write a simple HTTP REST service using Spring 4. I'm having troubles sending data to a POST endpoint @RequestMapping(value = "/onlyPost", produces = "application/json", method = RequestMethod.POST) public @ResponseBody ResponseEntity...
more »

2017-09-30 19:09 (2) Answers

Spring Rest Controller track entity view count

I need to track entity view count.. for example I have a Product entity and have the following API endpoint: GET /products/{productID} In case I want to track a view count of a particular Product should I add additional logic that will increment ...
more »

2017-09-27 16:09 (4) Answers