connect my spring boot project to a mysql database

I am trying to connect my spring boot project to mysql database but i keep encountering an error but cant seem to work out what it is. spring.jpa.hibernate.ddl-auto=create spring.datasource.url=jdbc:mysql://localhost:3306/mydb?useSSL=false spring.da...
more »

2017-10-04 17:10 (2) Answers

Deploying Vaadin/SpringBoot as WAR

Am trying to deploy a minimal Vaadin/SpringBoot application as a WAR file into a stand-alone Tomcat. Everything works if I run gradle vaadinRun and access under localhost:8080, but creating the WAR file with gradle war and then copying it into the w...
more »

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

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 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

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

Configuring the URL context

I am working on configuring a website where the client wants us to configure URL's like example.com/newyork and example.com/england. We are using Java SpringBoot environment. Please advise how should I approach this problem? Is this something that ...
more »

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

JSON parse error: Already had POJO for id

I already saw some question about this topic but i could not apply it to my case because I tried to apply them and the error continued. so I come to expose my situation. I read some comments about it and said that if I changed the name of my colum...
more »

2017-09-29 19:09 (1) Answers

json schema validation anyOf in Javax validation

We were using json schema validation. Since, it was not easy to maintain, extend, we decided to use javax validation for bean validation for application/json content. Json schema validation supports anyOf, allOf. How can we achive the same operations...
more »

2017-09-27 09:09 (0) Answers

mapstruct with gradle in spring boot

I am trying to use mapstruct with gradle in spring boot project. When I am adding configuration for mapstruct, I am constantly getting error for net.ltgt.apt plugin not found. Any idea what I am missing here. Below is my gradle build file: repositor...
more »

2017-09-26 04:09 (1) Answers

Intellij IDEA doesn't resolve Gradle dependencies

I'm using Intellij IDEA 2017.2.4 and Gradle 4.0.1 I have few Spring Boot services. And I facing a problem to run them, they can fail while starting in a random way because of missing dependencies. I have a parent project with build.gradle: buildscr...
more »

2017-09-25 16:09 (1) Answers

Cache Message Source

For each call on the Message Source implementation, I would like to do a cache before call the remote server. Here is the pseudo code. @Configuration public class ConfigurationForMessageSource { @Bean public MessageSource messageSource() {...
more »

2017-09-22 19:09 (0) Answers

RCE in PATCH requests in Spring Data REST

i am currently using Springboot version 1.5.6 and i notice a recent vulnerability https://pivotal.io/security/cve-2017-8046. Is it a must to upgrade to 2.0.0M4 or upgrade to 1.5.8 and above would solve the vulnerability issue. my dependencies are ...
more »

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

Adding CSV File directly into cache folder

Currently in my program ,I have placed csv file in separate folder and then after reading it m serializing and storing it in separate cache folder(during app start up).And when API is called m deserializing it and giving it to frontEnd.My question is...
more »

2017-09-21 18:09 (0) Answers

IntelliJ Gradle Sync Error

I recently upgraded to IntelliJ 2017.2.4 and can no longer sync my Gradle app. This prevents the dependencies from being downloaded which in turn prevents my app from building. I can build from the command line but cannot download dependencies or 's...
more »

2017-09-21 14:09 (1) Answers

How to disable EhCache for JUnit Test Cases

I am trying to write a test case for my service which uses EhCache for caching , but the problem is for Test cases I don't need it to be cached.So I can I disable it for test cases. I am working with Gradle project Set up. ...
more »

2017-09-21 10:09 (2) Answers

Gradle Build Server Variants

Consider a Gradle project with the following modules: server, service-A, service-B. 'server' is a Spring Boot Application where 'service-A' and 'service-B' are Spring Web Rest Controllers. Sometimes I want to build a server configured with both serv...
more »

2017-09-19 16:09 (0) Answers

Multiple Sprint boot configurations

I have two classes with main method in my Spring Boot application. 1. XYZToolApplication 2. XYZWebApplication Both of them extends SpringBootServletInitializer. Both are annotated with @SpringBootApplication and @Configuration. I am using Gradle as...
more »

2017-09-17 20:09 (1) Answers