这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@programenth
Copy link
Contributor

Hi @JavierPeris ,

Could you please review the following PR related to BAEL-8434
Article Draft link: https://drafts.baeldung.com/?p=211934&preview=true

Comment on lines 5 to 10
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the logging-modules as the parent POM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated code!

studentService.addStudent(student2);
List<Student> studentList = studentService.getStudents();

Student student3=studentList.stream().filter(s -> s.getRollNo()==5).findFirst().get();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use orElseThrow instead of get

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated code!

import java.util.List;

@SpringBootTest
class StudentServiceUnitTest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format the file.

<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @JavierPeris ,
I was getting conflicts in the build due to other loggers because there are other submodules in which they have other loggers already (other than log4j2).

Error for reference:
SLF4J(W): Class path contains multiple SLF4J providers. SLF4J(W): Found provider [org.apache.logging.slf4j.SLF4JServiceProvider@64711bf2] SLF4J(W): Found provider [ch.qos.logback.classic.spi.LogbackServiceProvider@169da7f2] SLF4J(W): See https://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J(I): Actual provider is of type [org.apache.logging.slf4j.SLF4JServiceProvider@64711bf2]

Copy link
Contributor

@JavierPeris JavierPeris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format the files, so the imports be in the correct order.

@programenth
Copy link
Contributor Author

Please format the files, so the imports be in the correct order.

Hi @JavierPeris ,
I have reordered imports by following the general Standard order:
Standard Java Packages (java.)
Third-Party Packages (org.
, com.*)
Project-Specific Packages

Copy link
Contributor

@JavierPeris JavierPeris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format the files. Imports don't have empty lines as separators, fields within a class start with an empty line, etc.

@JavierPeris JavierPeris merged commit c224745 into eugenp:master Nov 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants