All Questions

36
votes
1answers
18708 views

Connection to Db dies after >4<24 in spring-boot jpa hibernate

I have an app that uses spring-boot,jpa-hiberanate with mysql.I am getting this error log Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received fro...
3
votes
1answers
1911 views

Springboot Security hasRole not working

I’m unable to use hasRole method in @PreAuthorize annotation. Also request.isUserInRole(“ADMIN”) gives false. What am I missing? Although .hasAuthority(“ADMIN”) works fine. I am assigning a...
60
votes
4answers
57031 views

Spring Boot Configure and Use Two DataSources

I am new to Spring and Spring Boot. How would one go about to configure and use two data sources. I am looking for more than what is no this doc page http://docs.spring.io/spring-boot/docs/1.2.3.BUILD...
15
votes
3answers
10736 views

How to add a dependency to a Spring Boot Jar in another project?

I have a Spring Boot application and I have created a Jar out of that. Following is my pom.xml: <dependencies> <dependency> <groupId>org.springframework.boot</groupId...
128
votes
12answers
128548 views

How to add a filter class in Spring Boot?

I wonder, if there is any annotation for a Filter class (for web applications) in Spring Boot? Perhaps @Filter? I want to add a custom filter in my project. The Spring Boot Reference Guide mentione...
85
votes
4answers
20876 views

POSTing a @OneToMany sub-resource association in Spring Data REST

Currently I have a Spring Boot application using Spring Data REST. I have a domain entity Post which has the @OneToMany relationship to another domain entity, Comment. These classes are structured as ...
105
votes
8answers
121324 views

Spring Boot REST service exception handling

I am trying to set up a large-scale REST services server. We're using Spring Boot 1.2.1 Spring 4.1.5, and Java 8. Our controllers are implementing @RestController and the standard @RequestMapping an...
1
votes
1answers
1578 views

Spring multiple imapAdapter

I am novice in Spring and I don't like code duplication. I wrote one ImapAdapter that works fine: @Component public class GeneralImapAdapter { private Logger logger = LoggerFactory.getLogger(get...
62
votes
7answers
58509 views

How to shutdown a Spring Boot Application in a correct way?

In the Spring Boot Document, they said that 'Each SpringApplication will register a shutdown hook with the JVM to ensure that the ApplicationContext is closed gracefully on exit.' When I click ctrl+c...
150
votes
24answers
222901 views

Spring Boot - Cannot determine embedded database driver class for database type NONE

This is the error that is thrown when trying to run my web app: [INFO] WARNING: Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.b...

Previous Next