You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ The following are the initially required software pieces:
88
88
89
89
2.**Git**: it can be downloaded and installed from https://git-scm.com/downloads.
90
90
91
-
3.**Java 17 EA**: it can be downloaded and installed from https://jdk.java.net/17/.
91
+
3.**Java 21 EA**: it can be downloaded and installed from https://jdk.java.net/21/.
92
92
93
93
4.**Spring Boot Initializer**: This *Initializer* generates *spring* boot project with just what you need to start quickly! Start from here https://start.spring.io/.
Original URL: `jdbc:mysql:5.7://somehostname:someport/databasename`
119
+
Original URL: `jdbc:mysql:8.0.36://somehostname:someport/databasename`
130
120
131
121
Insert `tc:` after `jdbc:` as follows. Note that the hostname, port and database name will be ignored; you can leave these as-is or set them to any value.
132
122
133
-
TestContainers URL with a specific version: `jdbc:tc:mysql:5.7:///databasename`
123
+
TestContainers URL with a specific version: `jdbc:tc:mysql:8.0.36:///databasename`
134
124
135
125
For multiple databases testing we can use different profiles:
@@ -155,19 +145,19 @@ For multiple databases testing we can use different profiles:
155
145
##### Using a classpath init script
156
146
Testcontainers can run an init script after the database container is started, but before your code is given a connection to it. The script must be on the classpath, and is referenced as follows:
Instead of running a fixed script for DB setup, it may be useful to call a Java function that you define. This is intended to allow you to trigger database schema migration tools. To do this, add TC_INITFUNCTION to the URL as follows, passing a full path to the class name and method:
The init function must be a public static method which takes a java.sql.Connection as its only parameter, e.g.
173
163
@@ -180,7 +170,7 @@ The init function must be a public static method which takes a java.sql.Connecti
180
170
##### Running container in daemon mode
181
171
By default database container is being stopped as soon as last connection is closed. There are cases when you might need to start container and keep it running till you stop it explicitly or JVM is shutdown. To do this, add TC_DAEMON parameter to the URL as follows:
0 commit comments