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
5903e9a5
Commit
5903e9a5
authored
Jul 19, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
ab364b07
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
7 deletions
+20
-7
DataJdbcTest.java
...ework/boot/test/autoconfigure/data/jdbc/DataJdbcTest.java
+12
-1
JdbcTest.java
...pringframework/boot/test/autoconfigure/jdbc/JdbcTest.java
+4
-3
DataJpaTest.java
...ramework/boot/test/autoconfigure/orm/jpa/DataJpaTest.java
+4
-3
No files found.
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/jdbc/DataJdbcTest.java
View file @
5903e9a5
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -31,6 +31,7 @@ import org.springframework.boot.test.autoconfigure.OverrideAutoConfiguration;
import
org.springframework.boot.test.autoconfigure.core.AutoConfigureCache
;
import
org.springframework.boot.test.autoconfigure.filter.TypeExcludeFilters
;
import
org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.context.annotation.ComponentScan.Filter
;
import
org.springframework.core.annotation.AliasFor
;
import
org.springframework.core.env.Environment
;
...
...
@@ -44,6 +45,16 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
* <p>
* Using this annotation will disable full auto-configuration and instead apply only
* configuration relevant to Data JDBC tests.
* <p>
* By default, tests annotated with {@code @DataJdbcTest} will use an embedded in-memory
* database (replacing any explicit or usually auto-configured DataSource). The
* {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} annotation can be used to
* override these settings.
* <p>
* If you are looking to load your full application configuration, but use an embedded
* database, you should consider {@link SpringBootTest @SpringBootTest} combined with
* {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} rather than this
* annotation.
*
* @author Andy Wilkinson
* @since 2.1.0
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTest.java
View file @
5903e9a5
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -46,8 +46,9 @@ import org.springframework.transaction.annotation.Transactional;
* Using this annotation will disable full auto-configuration and instead apply only
* configuration relevant to jdbc tests.
* <p>
* By default, tests annotated with {@code @JdbcTest} will use an embedded in-memory
* database (replacing any explicit or usually auto-configured DataSource). The
* By default, tests annotated with {@code @JdbcTest} are transactional and roll back
* at the end of each test. They also use an embedded in-memory database (replacing any
* explicit or usually auto-configured DataSource). The
* {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} annotation can be used to
* override these settings.
* <p>
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/orm/jpa/DataJpaTest.java
View file @
5903e9a5
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -48,8 +48,9 @@ import org.springframework.transaction.annotation.Transactional;
* Using this annotation will disable full auto-configuration and instead apply only
* configuration relevant to JPA tests.
* <p>
* By default, tests annotated with {@code @DataJpaTest} will use an embedded in-memory
* database (replacing any explicit or usually auto-configured DataSource). The
* By default, tests annotated with {@code @DataJpaTest} are transactional and roll back
* at the end of each test. They also use an embedded in-memory database (replacing any
* explicit or usually auto-configured DataSource). The
* {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} annotation can be used to
* override these settings.
* <p>
...
...
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