Skip to content

Commit a2186fd

Browse files
committed
docs: add java class conventions to README.md
1 parent ab21eaf commit a2186fd

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,27 @@ The following are lists of conventions that either *should* be followed or *must
6060

6161
- URLs must be `kebab-case`
6262
- Packages:
63-
- Names must be `snake_case`
63+
- Names must be `snake_case`
64+
- Classes:
65+
- Names must be `PascalCase`
66+
- Annotations should have the following order:
67+
- Spring:
68+
- Bean type (`@Component`, `@Configuration`, `@RestController`, `@Service`, ...)
69+
- JPA:
70+
- `@Entity`
71+
- Constraints (`@UniqueConstraint`, ...)
72+
- Lombok:
73+
- constructors:
74+
- `@AllArgsConstructor`
75+
- `@NoArgsConstructor`
76+
- `@RequiredArgsConstructor`
77+
- `@Getter`
78+
- `@Setter`
79+
- `@EqualsAndHashCode`
80+
- ...
81+
- Should be structured as follows:
82+
- `static` constants and variables
83+
- Instance attributes
84+
- Constructors
85+
- `static` functions
86+
- Instance methods

0 commit comments

Comments
 (0)