Samples how to use the microservice wildfly-swarm.
branch | status |
---|---|
master |
Sample project how to use wildfly-swarm as very small rest service with lightweight dependency injection via CDI. No EJB.
- Jax-rs
- CDI
Sample project how to use wildfly-swarm as rest service with CDI and a h2 database via JPA. No EJB.
- Jax-rs
- CDI
- JPA
- H2-DB
If you want to customize your database access, put the following properties in your pom.xml. More about configuring databases.
<build>
<finalName>${project.finalname}</finalName>
<plugins>
<plugin>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-plugin</artifactId>
<configuration>
<mainClass>${project.mainclass}</mainClass>
<properties>
<swarm.ds.name>ExampleDS</swarm.ds.name>
<swarm.ds.username>app</swarm.ds.username>
<swarm.ds.password>app</swarm.ds.password>
<swarm.ds.connection.url>jdbc:h2:./db/repository</swarm.ds.connection.url>
</properties>
</configuration>
<version>${version.wildfly-swarm}</version>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
The source code is licensed under the MIT license.