这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions persistence-modules/jdbc-mysql/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>jdbc-mysql</artifactId>
<version>1.0-SNAPSHOT</version>

<parent>
<groupId>com.baeldung</groupId>
<artifactId>persistence-modules</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>


<dependencies>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>${mysql-connector-java.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.mwiede</groupId>
<artifactId>jsch</artifactId>
<version>${jsch.version}</version>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.0</version>
</plugin>
</plugins>
</build>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>

<jsch.version>0.2.20</jsch.version>
<mysql-connector-java.version>8.0.32</mysql-connector-java.version>
</properties>

</project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
public class MySQLLoadDriverUnitTest {

@Test
void givenADriverClass_whenDriverLoaded_thenEnsureNoExceptionThrown() {
assertDoesNotThrow(() -> {
Class.forName("com.mysql.cj.jdbc.Driver");
});
}

}
package com.baeldung.classnotfound;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;

import org.junit.jupiter.api.Test;

public class MySQLLoadDriverUnitTest {

@Test
void givenADriverClass_whenDriverLoaded_thenEnsureNoExceptionThrown() {
assertDoesNotThrow(() -> {
Class.forName("com.mysql.cj.jdbc.Driver");
});
}

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.baeldung;
package com.baeldung.truncation;

import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertThrows;
Expand Down
60 changes: 60 additions & 0 deletions persistence-modules/jdbc/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung.core-java-persistence-4</groupId>
<artifactId>jdbc</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>jdbc</name>

<parent>
<groupId>com.baeldung</groupId>
<artifactId>persistence-modules</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.16.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${springframework.spring-web.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${springframework.boot.spring-boot-starter.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
</plugins>
</build>

<properties>
<h2.version>2.3.230</h2.version>
<springframework.boot.spring-boot-starter.version>3.0.4</springframework.boot.spring-boot-starter.version>
<springframework.spring-web.version>6.0.6</springframework.spring-web.version>
</properties>
</project>

This file was deleted.

34 changes: 0 additions & 34 deletions persistence-modules/my-sql/pom.xml

This file was deleted.

5 changes: 3 additions & 2 deletions persistence-modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
<module>java-mongodb-2</module> <!-- long running -->
<module>java-mongodb-3</module> <!-- long running -->
<module>java-mongodb-queries</module> <!-- long running -->
<module>jdbc</module>
<module>jdbc-cp</module>
<module>jdbc-mysql</module>
<module>jimmer</module>
<module>jnosql</module> <!-- long running -->
<module>jooq</module>
Expand Down Expand Up @@ -142,9 +145,7 @@
<module>spring-boot-persistence-5</module>
<module>hibernate-annotations-2</module>
<module>hibernate-reactive</module>
<module>my-sql</module>
<module>spring-data-envers</module>
<module>jdbc-cp</module>
</modules>

<properties>
Expand Down