Skip to content

Commit

Permalink
Merge pull request #15 from revaturelabs/bertrick
Browse files Browse the repository at this point in the history
Bertrick
  • Loading branch information
KennethDavis391 authored Feb 14, 2020
2 parents d16f509 + f3cd2b8 commit 44bbbc6
Show file tree
Hide file tree
Showing 19 changed files with 1,150 additions and 77 deletions.
52 changes: 44 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
</parent>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -67,12 +73,26 @@
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
<version>0.11.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>com.github.javafaker</groupId>
<artifactId>javafaker</artifactId>
<version>0.17.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
Expand All @@ -84,32 +104,48 @@
<scope>test</scope>
</dependency>


<!--
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>

<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
-->

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901-1.jdbc4</version>
</dependency>

<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>

<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<!-- <version>1.1.1</version> -->
</dependency>

<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>

</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>

</dependencies>

</project>
7 changes: 5 additions & 2 deletions src/main/java/com/revature/Driver.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import com.revature.services.DistanceService;


/**
* Driver class is the main class for this project.
Expand All @@ -21,7 +23,6 @@
@SpringBootApplication
@EnableSwagger2
public class Driver {

/**
* The main method of the Driver class.
*
Expand All @@ -30,7 +31,8 @@ public class Driver {
*/

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

}

/**
Expand Down Expand Up @@ -61,5 +63,6 @@ public Docket api() {
.build()
.apiInfo(apiInfo());
}


}
4 changes: 4 additions & 0 deletions src/main/java/com/revature/beans/Admin.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import org.springframework.stereotype.Component;

Expand All @@ -33,6 +35,8 @@ public class Admin implements Serializable {

@NotBlank
@Column(name="user_name")
@Size(min=3,max=12)
@Pattern(regexp="^\\w+\\.?\\w+$")
private String userName;

public Admin() {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/revature/beans/Car.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;

import org.springframework.stereotype.Component;

Expand All @@ -34,6 +35,7 @@ public class Car implements Serializable {
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="car_id")
private int carId;

private String color;

@Positive
Expand Down
Loading

0 comments on commit 44bbbc6

Please sign in to comment.