Skip to content

Commit

Permalink
[JPA] Ajout Snippet Configuration Maven
Browse files Browse the repository at this point in the history
  • Loading branch information
gideruette committed Sep 20, 2024
1 parent c24910f commit b12b5cd
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions docs/generator/jpa.md
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,6 @@ domain:
type: ResponseEntity<Void>
imports:
- org.springframework.http.ResponseEntity
```

### Décorateurs
Expand Down Expand Up @@ -986,8 +985,33 @@ decorator:
description: Droit nécessaire pour pouvoir accéder au endpoint
java:
annotations:
- "@PreAuthorize(\"hasAuthority('{$0}')\")"
- '@PreAuthorize("hasAuthority(''{$0}'')")'
imports:
- org.springframework.security.access.prepost.PreAuthorize
```

### Configuration maven

Pour ajouter les sources du dossier `javagen` au build, vous pouvez utiliser la configuration suivante :

```xml
<!-- Ajout des sources générées -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/javagen</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
```

0 comments on commit b12b5cd

Please sign in to comment.