Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,49 @@ layout: default


<article>
<h2>New WriteUp Aviable</h2>
<p>A new writeup for HackTheBox - Stocker is now aviable. <a href="/pages/writeups/hackthebox/machines/stocker">check it out</a></p>
<small>29 Gen 2023</small>
<h2>New Project Available</h2>
<p>My first github pubblic Project. Read the <a href="{{'/pages/projects/javaGenericCrud'}}">Post</a>.</p>
<small>02 Feb 2023</small>
</article>
<hr>

<article>
<h2>New WriteUp Aviable</h2>
<p>A new writeup for HackTheBox - Precious is now aviable. <a href="/pages/writeups/hackthebox/machines/precious">check it out</a></p>
<h2>New WriteUp Available</h2>
<p>A new writeup for HackTheBox - Stocker is now Available. <a href="{{'/pages/writeups/hackthebox/machines/stocker'}}">check it out</a></p>
<small>29 Gen 2023</small>
</article>
<hr>

<article>
<h2>New WriteUp Aviable</h2>
<p>A new writeup for AngstromCTF 2019 - Paper Bin is now aviable. <a href="/pages/writeups/angstromctf/2019/paperbin">check it out</a></p>
<h2>New WriteUp Available</h2>
<p>A new writeup for HackTheBox - Precious is now Available. <a href="{{'/pages/writeups/hackthebox/machines/precious'}}">check it out</a></p>
<small>29 Gen 2023</small>
</article>
<hr>

<article>
<h2>New WriteUp Aviable</h2>
<p>A new writeup for AngstromCTF 2019 - Paper Trail is now aviable. <a href="/pages/writeups/angstromctf/2019/papertrail">check it out</a></p>
<h2>New WriteUp Available</h2>
<p>A new writeup for AngstromCTF 2019 - Paper Bin is now Available. <a href="{{'/pages/writeups/angstromctf/2019/paperbin'}}">check it out</a></p>
<small>29 Gen 2023</small>
</article>
<hr>

<article>
<h2>New WriteUp Aviable</h2>
<p>A new writeup for AngstromCTF 2019 - LITHP is now aviable. <a href="/pages/writeups/angstromctf/2019/lithp">check it out</a></p>
<h2>New WriteUp Available</h2>
<p>A new writeup for AngstromCTF 2019 - Paper Trail is now Available. <a href="{{'/pages/writeups/angstromctf/2019/papertrail'}}">check it out</a></p>
<small>29 Gen 2023</small>
</article>
<hr>

<article>
<h2>New WriteUp Aviable</h2>
<p>A new writeup for AngstromCTF 2019 - Scratch It Out is now aviable. <a href="/pages/writeups/angstromctf/2019/scratchitout">check it out</a></p>
<h2>New WriteUp Available</h2>
<p>A new writeup for AngstromCTF 2019 - LITHP is now Available. <a href="{{'/pages/writeups/angstromctf/2019/lithp'}}">check it out</a></p>
<small>29 Gen 2023</small>
</article>
<hr>
<hr>

<article>
<h2>New WriteUp Available</h2>
<p>A new writeup for AngstromCTF 2019 - Scratch It Out is now Available. <a href="{{'/pages/writeups/angstromctf/2019/scratchitout'}}">check it out</a></p>
<small>29 Gen 2023</small>
</article>
81 changes: 81 additions & 0 deletions pages/projects/javaGenericCrud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
layout: post
author: k0d14k
---

Github : <a href="https://github.com/lucapuzzoni/GenericCRUD">Here</a>

## Configuration istructions
You can use this project to implement automatically your CRUD methods.

You just have to create a **SpringBoot Application project** from [here](https://start.spring.io/) using **Maven** with all the following dependencies:

```xml

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

<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
```

And then copy the `it.lucapuzzoni.crud` package in your `src/main/java` directory.

## Usage Istructions
To use my classes you must extend them. With an example it should be clear.

### Entity
```Java
@Entity @Table(name = 'yourTable')
public class YourEntity extends CrudModel<YourEntity>{
// You'll not need to add the @Id field

// Add all columns you want using JPA notations

/**
Remember to implement the absorbe method because is
the method will be called by the update fuction
*/
}
```

### Repository
```Java
@Repository
public interface YourRepository extends CrudRepository<YourEntity>{
// Your Entity should extend CrudModel
}
```

### Service
```Java
@Service
public interface YourService extends CrudService<YourEntity>{}


@Service
public class YourServiceImpl extends CrudServiceImpl<YourEntity>{}
```

### Controller
```Java
@Controller
public class YourController extends CrudController<YourEntity>{}
```

## Conclusions
If you like this project put a Star and Join me to update it otherwise please, explain to me what you didn't like opening an issue and discussing it with me.