This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function (status) { | |
return isFav.isFavourited(userid, status) | |
.then((res) => { | |
return res | |
}) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SpringBootApplication | |
public class RestSpringTestApplication { | |
public static void main(String[] args) { | |
SpringApplication.run(RestSpringTestApplication.class, args); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Data | |
@AllArgsConstructor | |
@NoArgsConstructor | |
@Entity | |
@Table(name = "book") | |
public class Book implements Serializable | |
{ | |
@Id | |
@GeneratedValue(strategy = GenerationType.IDENTITY) | |
private int id; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Data | |
@AllArgsConstructor | |
@NoArgsConstructor | |
@Entity | |
@Table(name = "publisher") | |
public class Publisher implements Serializable | |
{ | |
@Id | |
@GeneratedValue(strategy = GenerationType.IDENTITY) | |
private int id; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface MainService <T> | |
{ | |
Page<T> getAll( Pageable pageable); | |
T add( T o); | |
T update (T o, int id); | |
T getById( int id ); | |
T deleteById(int id); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SuppressWarnings( "unchecked" ) | |
public class ResponseWrapper<T> extends ResponseEntity<T> | |
{ | |
public ResponseWrapper(T t , HttpStatus status ){ | |
super( ( T ) new Resultset<>( t,status ),status); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Data | |
public class Resultset<T> | |
{ | |
private HttpStatus status; | |
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd-MM-yyyy hh:mm:ss") | |
private LocalDateTime timestamp; | |
private T data; | |
private Resultset() | |
{ |