Skip to content

Commit

Permalink
style: move static imports above, add Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaUgrai committed Jun 27, 2024
1 parent dc0cd64 commit f3789f8
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 15 deletions.
5 changes: 0 additions & 5 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-security</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

@SpringBootApplication
public class BackendApplication {

public static void main(String[] args) {
SpringApplication.run(BackendApplication.class, args);
}

public static void main(String[] args) {
SpringApplication.run(BackendApplication.class, args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**

Check warning on line 9 in backend/src/main/java/com/greenfoxacademy/backend/controller/HealthCheckController.java

View workflow job for this annotation

GitHub Actions / build

[testtool] reported by reviewdog 🐶 First sentence of Javadoc is missing an ending period. Raw Output: /github/workspace/./backend/src/main/java/com/greenfoxacademy/backend/controller/HealthCheckController.java:9:0: warning: First sentence of Javadoc is missing an ending period. (com.puppycrawl.tools.checkstyle.checks.javadoc.SummaryJavadocCheck)
* Endpoint created to see if app works
*/
@Controller
public class HealthCheckController {
@GetMapping ("/health-check")
Expand Down
1 change: 0 additions & 1 deletion backend/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
spring.application.name=backend

spring.datasource.url=jdbc:postgresql://localhost:5432/db
spring.datasource.username=${USERNAME}
spring.datasource.password=${PASSWORD}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.greenfoxacademy.backend.controller;

import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.web.servlet.MockMvc;


import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

@SpringBootTest
@AutoConfigureMockMvc
class HealthCheckControllerTest {
Expand Down
1 change: 0 additions & 1 deletion backend/src/test/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
spring.application.name=backend

spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=user
Expand Down

0 comments on commit f3789f8

Please sign in to comment.