How to resolve module reads package error in java9

I am trying to understand new modularity in java 9 with spring-boot so I want to run some simple application for example: I am using maven 3.5.0 with java 9: Apache Maven 3.5.0 (ff8f5e7444045639af65...
more »

2017-06-22 13:06 (0) Answers

How to Pen Test REST API which is secured with jwt

I have a RESt API which is secured with JWT token (As a HTTP header). I want to do a Penetration Test on the TEST API and have no prior understanding in this topic.So i went through some guidance and I installed OWASP ZAP and typed the URL and presse...
more »

2017-06-20 11:06 (1) Answers

Log REST resource URL using Spring AspectJ

I am using Spring Boot to develop a REST API and I would like to log the URL of the resources being retrieved by the clients using Spring Aspect. My class for the Aspect have this code: @Component @Aspect public class Logs { @Pointcut("@annotat...
more »

2017-06-19 11:06 (1) Answers

JHipster app with no database

[J]Hipsters! The 5/16 section on JHipster steps is mandatorily forcing me to choose a type of database, although I'm running another mock-service project (a SpringBoot app running using gradle) to access the database because of security reasons. So...
more »

2017-06-18 15:06 (1) Answers

Making request to @Valid

I'm developping spring-boot application, I need to validate user information before checking other information. This is a snippet: @RequestMapping(value = "/create-user", method = RequestMethod.POST) public String ceateCustomer(@Valid @RequestBody ...
more »

2017-06-18 11:06 (1) Answers

Spring Boot where is the compiled jar file

I have generated a gradle project from using spring initializr and added a few lines to it to print out the typical hello world message as well as the name given to the url. It works as expected when run from intellij idea on localhos...
more »

2017-06-16 18:06 (1) Answers

@CacheEvict key not working

When I use CacheEvict with all entries, it works all fine: @CacheEvict(value = "users", allEntries = true) But when I want to use key to remove given cache entry, it just can't find the key and throws NullPointerException. I'm sure I'm passing a n...
more »

2017-06-15 08:06 (0) Answers

How to Configure Spring Boot with Memcached

I am new to Memcached. I need to configure my spring boot application with Memcached. I researched a lot on the topic but I could not find a documentation for the same. By default Spring boot uses Concurrent HashMap for caching but how do I configur...
more »

2017-06-12 21:06 (2) Answers

Hibernate @Filter with @Cache not working

I have the entity FormTable that has one to many relationship with another entity FormInLangagueTable, I want to filter out the in language entities (based on dynamic parameter), and return the final object with the list of in language objects that m...
more »

2017-05-26 16:05 (0) Answers

Get authenticated user

I'm implementing a project using Spring security oauth2, everything works perfectly, now I want to start digging deeper beyond the basics. I want to check if the user making the request is the actual user owner of the resource, the end result would b...
more »

2017-05-24 17:05 (2) Answers

Spring Security using HTTP headers

I am trying to add security to my Spring Boot application. My current application is using REST controllers and every time I get a GET or POST request I read the HTTP header to retrieve the user and password in order to validate them against the prop...
more »

2017-05-22 12:05 (2) Answers

Spring Boot disable @Cacheable per request

I'm trying to disable a Cacheable function in Spring Boot based on a URL parameter. For example I tried the condition with SpEL but I haven't been able to get it work @Cacheable(value = "value", key...
more »

2017-05-19 23:05 (1) Answers

How to check if Resttemplate gets error?

How can I check if I get an error with RestTemplate in my SpringBootApplication properly? I managed to create an ResponseErrorHandler but am not sure how to handle that error in my code. So I want to print an error message if an error occured and els...
more »

2017-05-19 18:05 (1) Answers

spring-boot with the gradle java java-plugin

I use gradle with the new java-library plugin. With this plugin we can use new configurations for dependencies instead of 'compile', 'runtime', 'test' etc. see java-library plugin documentation But with the spring-boot plugin, when I launch the task...
more »

2017-05-18 17:05 (0) Answers