Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
4be48d0d
Commit
4be48d0d
authored
Apr 21, 2021
by
izeye
Committed by
Stephane Nicoll
Apr 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
See gh-26188
parent
8edeb2c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
spring-boot-features.adoc
...ing-boot-docs/src/docs/asciidoc/spring-boot-features.adoc
+1
-1
DataJpaTest.java
...ramework/boot/test/autoconfigure/orm/jpa/DataJpaTest.java
+3
-3
No files found.
spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc
View file @
4be48d0d
...
@@ -7528,7 +7528,7 @@ You can use the `@DataJpaTest` annotation to test JPA applications.
...
@@ -7528,7 +7528,7 @@ You can use the `@DataJpaTest` annotation to test JPA applications.
By default, it scans for `@Entity` classes and configures Spring Data JPA repositories.
By default, it scans for `@Entity` classes and configures Spring Data JPA repositories.
If an embedded database is available on the classpath, it configures one as well.
If an embedded database is available on the classpath, it configures one as well.
SQL queries are logged by default by setting the `spring.jpa.show-sql` property to `true`.
SQL queries are logged by default by setting the `spring.jpa.show-sql` property to `true`.
This can be disabled using the `showSql()` attribute of the annotation.
This can be disabled
by
using the `showSql()` attribute of the annotation.
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@DataJpaTest` annotation is used.
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@DataJpaTest` annotation is used.
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/orm/jpa/DataJpaTest.java
View file @
4be48d0d
/*
/*
* Copyright 2012-202
0
the original author or authors.
* Copyright 2012-202
1
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -54,8 +54,8 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -54,8 +54,8 @@ import org.springframework.transaction.annotation.Transactional;
* override these settings.
* override these settings.
* <p>
* <p>
* SQL queries are logged by default by setting the {@code spring.jpa.show-sql} property
* SQL queries are logged by default by setting the {@code spring.jpa.show-sql} property
* to {@code true}. This can be disabled
using the {@link DataJpaTest#showSql() showSql}
* to {@code true}. This can be disabled
by using the {@link DataJpaTest#showSql()
* attribute.
*
showSql}
attribute.
* <p>
* <p>
* If you are looking to load your full application configuration, but use an embedded
* If you are looking to load your full application configuration, but use an embedded
* database, you should consider {@link SpringBootTest @SpringBootTest} combined with
* database, you should consider {@link SpringBootTest @SpringBootTest} combined with
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment