Lỗi có thể cung cấp thêm thông tin như thế này (mặc dù tên jar của bạn có thể khác)
SLF4J: Tìm thấy ràng buộc trong [jar: file: / D: /Java/reposective/ch/qos/logback/logback- classic / 1.2.3 / logback- classic-1.2.3.jar! / Org / slf4j / impl / StaticLoggerBinder . class] SLF4J: Tìm thấy ràng buộc trong [jar: file: / D: /Java/reposeective/org/apache/logging/log4j/log4j-slf4j-impl/2.8.2/log4j-slf4j-impl-2.8.2.jar ! /org/slf4j/impl/StaticLoggerBinder. class]
Nhận thấy rằng cuộc xung đột đến từ hai chiếc lọ, được đặt tên logback-classic-1.2.3và log4j-slf4j-impl-2.8.2.jar.
Chạy mvn dependency:treetrong thư mục mẹ pom.xml dự án này, đưa ra:

Bây giờ chọn một trong những bạn muốn bỏ qua (có thể tiêu tốn một nỗ lực tinh tế tôi cần thêm trợ giúp về điều này)
Tôi quyết định không sử dụng cái được nhập từ spring-boot-starter-data-jpa(phụ thuộc hàng đầu) xuyên spring-boot-startersuốt spring-boot-starter-logging, pom trở thành:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
trong pom ở trên spring-boot-starter-data-jpasẽ sử dụng spring-boot-startercấu hình trong cùng một tệp, loại trừ logging(nó chứa logback)
<exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> </exclusion> </exclusions>trong các phần phụ thuộc (của pom.xml) đã gây ra xung đột đã giúp giải quyết vấn đề