Changes

Jump to navigation Jump to search
262 bytes added ,  15:54, 30 April 2022
m
Line 142: Line 142:  
     </dependencies>
 
     </dependencies>
 
....
 
....
</syntaxhighlight>
+
</syntaxhighlight>To run against a MySQL instead of H2 replace the h2 dependency by:<syntaxhighlight lang="xml">
 
+
....
 +
        <dependency>
 +
            <groupId>mysql</groupId>
 +
            <artifactId>mysql-connector-java</artifactId>
 +
        </dependency>
 +
....
 +
</syntaxhighlight><br />
 
===/src/main/resources/application.properties===
 
===/src/main/resources/application.properties===
   −
==== h2 Database ====
+
====h2 Database====
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">
 
spring.datasource.url=jdbc:h2:mem:testdb
 
spring.datasource.url=jdbc:h2:mem:testdb
Line 154: Line 160:  
</syntaxhighlight>database will be accessible via http://localhost:8080/h2-console
 
</syntaxhighlight>database will be accessible via http://localhost:8080/h2-console
   −
==== Docker MySQL ====
+
====Docker MySQL====
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">
 
#spring.datasource.url=jdbc:h2:mem:testdb
 
#spring.datasource.url=jdbc:h2:mem:testdb

Navigation menu