Fix checkstyle violations in testng smoke test

Add conventions plugin and fix surfaced checkstyle errors.
This commit is contained in:
Phillip Webb 2024-09-23 12:52:43 -07:00
parent 54df1edf8c
commit 54c3ccb4df
4 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,6 @@
plugins {
id "java"
id "org.springframework.boot.conventions"
}
description = "Spring Boot TestNG smoke test"

View File

@ -16,15 +16,15 @@
package smoketest.testng;
import jakarta.servlet.ServletContextEvent;
import jakarta.servlet.ServletContextListener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import jakarta.servlet.ServletContextEvent;
import jakarta.servlet.ServletContextListener;
@SpringBootApplication
public class SampleTestNGApplication {

View File

@ -16,13 +16,13 @@
package smoketest.testng.web;
import smoketest.testng.service.HelloWorldService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import smoketest.testng.service.HelloWorldService;
@Controller
public class SampleController {

View File

@ -16,7 +16,7 @@
package smoketest.testng;
import static org.assertj.core.api.Assertions.assertThat;
import org.testng.annotations.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@ -25,7 +25,8 @@ import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testng.annotations.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Basic integration tests for demo application.