tagged [spring-boot]

Change database schema used by Spring Boot

Change database schema used by Spring Boot How do I specify database schema used by Spring Boot? I am using default hibernate (=default) and postgres (but i hoping for a generic solution). I know how ...

18 Jun at 06:41

Specifying trust store information in spring boot application.properties

Specifying trust store information in spring boot application.properties I am using . I'm trying to have my keystore and truststore configured through `application.properties`. When I add the followin...

26 Sep at 12:33

What is the best way to return different types of ResponseEntity in Spring-Boot (Error Handling for REST with Spring)

What is the best way to return different types of ResponseEntity in Spring-Boot (Error Handling for REST with Spring) I have written simple REST application in `Spring Boot` (`Spring` Framework). It r...

How do I use Spring Boot to serve static content located in Dropbox folder?

How do I use Spring Boot to serve static content located in Dropbox folder? I have a Spring Boot web application, and I would like to serve static content located in a shared Dropbox directory on my L...

How to assign a value from application.properties to a static variable?

How to assign a value from application.properties to a static variable? I am using Spring MVC. I have a `UserService` class annotated with `@Service` that has a lot of static variables. I would like t...

19 Jul at 13:40

Spring post method "Required request body is missing"

Spring post method "Required request body is missing" I have this method for the login in the UserController. The problem is when i try to make the post request for the login i get this error: ``` {

24 Oct at 18:14

How to override application.properties during production in Spring-Boot?

How to override application.properties during production in Spring-Boot? I'm using spring boot and `application.properties` to select a database during development by `@Configuration @Profile("dev")`....

12 Dec at 11:10

Spring Boot - inject map from application.yml

Spring Boot - inject map from application.yml I have a [Spring Boot](http://projects.spring.io/spring-boot/) application with the following `application.yml` - taken basically from [here](http://docs....

23 Jul at 17:35

Spring @PropertySource using YAML

Spring @PropertySource using YAML Spring Boot allows us to replace our `application.properties` files with YAML equivalents. However, I seem to hit a snag with my tests. If I annotate my `TestConfigur...

22 Apr at 19:56

Returning JSON object as response in Spring Boot

Returning JSON object as response in Spring Boot I have a sample RestController in Spring Boot: I am using the JSON library [org.json](https://stleary.github.io/JSON-java/index.html) When I hit A

14 Jun at 20:57

JSON Java 8 LocalDateTime format in Spring Boot

JSON Java 8 LocalDateTime format in Spring Boot I'm having a small problem with formatting a Java 8 LocalDateTime in my Spring Boot Application. With 'normal' dates I have no problem, but the LocalDat...

30 Apr at 00:15

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

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

24 Oct at 12:5

Spring Scheduling - Cron expression for everyday at midnight not working?

Spring Scheduling - Cron expression for everyday at midnight not working? I am trying to schedule a task in Spring which is to be run everyday at midnight. I followed the [official guide](https://spri...

Spring Boot not serving static content

Spring Boot not serving static content I can't get my Spring-boot project to serve static content. I've placed a folder named `static` under `src/main/resources`. Inside it I have a folder named `imag...

20 Feb at 15:31

Spring Boot + JPA : Column name annotation ignored

Spring Boot + JPA : Column name annotation ignored I have a Spring Boot application with dependency `spring-boot-starter-data-jpa`. My entity class has a column annotation with a column name. For exam...

2 Sep at 06:59

Solutions to communicate with spring boot sseemitter from wpf client

Solutions to communicate with spring boot sseemitter from wpf client I have one wpf application and a spring boot application, and want to use server sent events to notify the wpf application when som...

@ConfigurationProperties Spring Boot Configuration Annotation Processor not found in classpath

@ConfigurationProperties Spring Boot Configuration Annotation Processor not found in classpath I try to make completion for custom properties in . I tried to create a simple project via : 1. Created a...

9 Sep at 15:5

java.lang.IllegalArgumentException: No converter found for return value of type

java.lang.IllegalArgumentException: No converter found for return value of type With this code I get the following exception ``` java.lang.IllegalArgumentException: No converter found for return value...

18 Aug at 15:40

Read file from resources folder in Spring Boot

Read file from resources folder in Spring Boot I'm using Spring Boot and `json-schema-validator`. I'm trying to read a file called `jsonschema.json` from the `resources` folder. I've tried a few diffe...

Swagger TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body

Swagger TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body I have added Swagger to my Spring Boot 2 application: This is my Swagger config: ``` @Configurat...

Environment Specific application.properties file in Spring Boot application

Environment Specific application.properties file in Spring Boot application In my Spring Boot application, i want to create environment specific properties file. The packaging type of my application i...

25 Aug at 05:51

Spring Boot Remove Whitelabel Error Page

Spring Boot Remove Whitelabel Error Page I'm trying to remove white label error page, so what I've done was created a controller mapping for "/error", But now I"m getting this error. ``` Exception in ...

18 Aug at 05:49

Database application.yml for Spring boot from applications.properties

Database application.yml for Spring boot from applications.properties I've got a working Spring Boot Application that connects to a Postgres database. I've got the project set up with an application.p...

How do I mock a REST template exchange?

How do I mock a REST template exchange? I have a service in which I need to ask an outside server via rest for some information: ``` public class SomeService { public List getListofObjectsA() { ...

17 Dec at 05:5

Spring Boot REST API - request timeout?

Spring Boot REST API - request timeout? I have a Spring Boot REST service that sometimes call third party services as a part of a request. I would like to set a timeout on all my resources (let's say ...

18 Mar at 23:57