Questions tagged [spring-boot]
Spring Boot is a framework that allows to easily create Spring-powered, production-grade applications and services with the absolute minimum fuss. It takes an opinionated view of the Spring platform designed to work for new and experienced users of Spring.
119,445
questions
961votes
58answers
912kviews
How to configure port for a Spring Boot application
How do I configure the TCP/IP port listened on by a Spring Boot application, so it does not use the default port of 8080.
451votes
21answers
463kviews
How to log SQL statements in Spring Boot?
I want to log SQL statements in a file.
I have the following properties in application.properties
spring.datasource.url=...
spring.datasource.username=user
spring.datasource.password=1234
spring....
436votes
31answers
652kviews
How to access a value defined in the application.properties file in Spring Boot
I want to access values provided in application.properties, e.g.:
logging.level.org.springframework.web: DEBUG
logging.level.org.hibernate: ERROR
logging.file=${HOME}/application.log
userBucket.path=...
390votes
18answers
609kviews
Spring Boot: How can I set the logging level with application.properties?
This is very simple question, but I cannot find information.
(Maybe my knowledge about Java frameworks is severely lacking)
How can I set the logging level with application.properties?
And logging ...
377votes
5answers
168kviews
What is the purpose of mvnw and mvnw.cmd files?
When I created a Spring Boot application I could see mvnw and mvnw.cmd files in the root of the project. What is the purpose of these two files?
331votes
9answers
134kviews
What is the difference between putting a property on application.yml or bootstrap.yml in spring boot?
What is the difference between putting a property on application.yml or bootstrap.yml in spring boot?
In logging.config case, the application works different.
316votes
17answers
334kviews
Running code after Spring Boot starts
I want to run code after my spring-boot app starts to monitor a directory for changes.
I have tried running a new thread but the @Autowired services have not been set at that point.
I have been ...
294votes
36answers
536kviews
org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
I am trying run a spring-boot application which uses hibernate via spring-jpa, but i am getting this error:
Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null ...
288votes
9answers
397kviews
Spring Boot Configure and Use Two DataSources
How can I configure and use two data sources?
For example here is what I have for the first data source:
application.properties
#first db
spring.datasource.url = [url]
spring.datasource.username = [...
269votes
11answers
220kviews
Difference between Spring MVC and Spring Boot [closed]
I have just started learning Spring. In my next step, I would like to develop bigger web applications.
Now I am wondering if I should start with Spring Boot or Spring MVC. I have already read some ...
266votes
24answers
351kviews
How can I add a filter class in Spring Boot?
Is there 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 mentioned about
...
257votes
15answers
419kviews
Setting active profile and config location from command line in spring boot
I have a spring boot application.
I have three profiles in my application-> development, staging and production. So I have 3 files
application-development.yml
application-staging.yml
application-...
252votes
21answers
352kviews
Spring Boot - Loading Initial Data
I'm wondering what the best way to load initial database data before the application starts? What I'm looking for is something that will fill my H2 database with data.
For example, I have a domain ...
242votes
12answers
302kviews
Override default Spring-Boot application.properties settings in Junit Test
I have a Spring-Boot application where the default properties are set in an application.properties file in the classpath (src/main/resources/application.properties).
I would like to override some ...
228votes
35answers
494kviews
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....