Skip to content

Commit

Permalink
Revert "Adding validation"
Browse files Browse the repository at this point in the history
This reverts commit f9f389e.
  • Loading branch information
alexertech committed Oct 25, 2023
1 parent f9f389e commit ba44d4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 1 addition & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>2.0.2</version>
</dependency>
</dependencies>
</dependencies>
<build>
<plugins>
<plugin>
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/example/blog/model/Post.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@
package com.example.blog.model;

import javax.persistence.Entity;
import javax.validation.constraints.NotBlank;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Objects;

@Entity
public class Post {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@NotBlank(message = "Title cannot be empty.")
private String title;
@NotBlank(message = "Body cannot be empty.")
private String body;
private int views;

Expand Down

0 comments on commit ba44d4d

Please sign in to comment.