Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joinfaces/joinfaces-maven-jar-example
JoinFaces Maven Jar Example
https://github.com/joinfaces/joinfaces-maven-jar-example
angularfaces bootsfaces butterfaces jetty joinfaces jsf mojarra myfaces primefaces spring-boot tomcat undertow
Last synced: 9 days ago
JSON representation
JoinFaces Maven Jar Example
- Host: GitHub
- URL: https://github.com/joinfaces/joinfaces-maven-jar-example
- Owner: joinfaces
- Created: 2016-05-12T12:02:29.000Z (over 8 years ago)
- Default Branch: 5.4.x
- Last Pushed: 2024-10-29T12:07:38.000Z (16 days ago)
- Last Synced: 2024-10-29T13:30:47.943Z (16 days ago)
- Topics: angularfaces, bootsfaces, butterfaces, jetty, joinfaces, jsf, mojarra, myfaces, primefaces, spring-boot, tomcat, undertow
- Language: Java
- Homepage:
- Size: 3.33 MB
- Stars: 83
- Watchers: 11
- Forks: 79
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
JoinFaces Example
=====
[![Build Status](https://github.com/joinfaces/joinfaces-maven-jar-example/actions/workflows/maven.yml/badge.svg)](https://github.com/joinfaces/joinfaces-maven-jar-example/actions)
[![Codecov](https://codecov.io/gh/joinfaces/joinfaces-maven-jar-example/branch/4.7.x/graph/badge.svg)](https://codecov.io/gh/joinfaces/joinfaces-maven-jar-example)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=joinfaces_joinfaces-maven-jar-example&metric=bugs)](https://sonarcloud.io/dashboard?id=joinfaces_joinfaces-maven-jar-example)
[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)This SAP (Single Page Application) illustrates JSF usage inside JAR packaged Spring Boot Application.
[JoinFaces](https://joinfaces.org) autoconfigures
[PrimeFaces](https://primefaces.org/),
[PrimeFaces Extensions](https://primefaces-extensions.github.io/),
[Apache MyFaces Tobago](https://github.com/apache/myfaces-tobago),
[OmniFaces](https://omnifaces.org/),
[AdminFaces](https://adminfaces.github.io/site/),
[Mojarra](https://eclipse-ee4j.github.io/mojarra/) and
[MyFaces](http://myfaces.apache.org) libraries to run at embedded
[Tomcat](https://tomcat.apache.org/),
[Jetty](https://www.eclipse.org/jetty) or
[Undertow](https://undertow.io/).
It autoconfigures [Weld](https://weld.cdi-spec.org),
[Apache OpenWebBeans](https://openwebbeans.apache.org/) and
[Rewrite](https://www.ocpsoft.org/rewrite/) too.## Run Example Application locally
1- Clone this project
```Shell
git clone https://github.com/joinfaces/joinfaces-maven-jar-example.git
```2- Build
```Shell
mvn clean install
```3- Run
```Shell
java -jar target/joinfaces-example-5.4.x.jar
```4- Access starter page at **http://localhost:8080/** This page can help you to choose the JoinFaces Starter that fits your needs. You may log in with credentials
| User | Password | Roles |
|------------|----------|------------|
| persapiens | 123 | ROLE_ADMIN |
| nyilmaz | qwe | ROLE_USER |Optional: If your IDE is showing build errors install [Lombok](https://projectlombok.org/setup/overview)
## Key Files
### pom.xml
Includes joinfaces starter dependency. All other jsf dependencies are included transitively.
```xml
5.4.0-rc1
org.joinfaces
joinfaces-bom
${joinfaces.version}
pom
import
org.joinfaces
faces-spring-boot-starter
```
Note that **security-spring-boot-starter** is included to secure the application.
```xml
org.joinfaces
security-spring-boot-starter
```
### src/main/resources/application.yml
Configure faces.PROJECT_STATE and faces.primefaces.THEME properties.
```yml
joinfaces:
faces:
PROJECT_STAGE: Development
primefaces:
theme: overcast
```### src/main/resources/META-INF/resources/content/starter.xhtml
Example page to help you choose the right JoinFaces Starter for you.
Note that xhtml, js, css and images files should be located at **src/main/resources/META-INF/resources** directory to JSF use them.
Look at **authorize** and **anonymous** jsf spring security facelet tags in action to secure page information.
```xhtml
```### src/main/java/org/joinfaces/example/JoinFacesExampleApplication.java
Very simple spring main application. Only SpringBootApplication annotation is required.
@SpringBootApplication
public class JoinFacesExampleApplication {### src/main/java/org/joinfaces/example/SecurityConfig.java
Spring Security configuration class to secure authentication with credentials to persapiens and nyilmaz users.
### src/main/java/org/joinfaces/example/view/StarterMBean.java
Managed bean using ViewScoped CDI annotation. The equivalent spring scope of ViewScoped annotation is configured automatically by JoinFaces Starter.
@Named
@ViewScoped
public class StarterMBean {## Getting Help
* Take a look at [JoinFaces Wiki](https://github.com/joinfaces/joinfaces/wiki).
* Report questions and bugs at [github.com/joinfaces/joinfaces-example/issues](https://github.com/joinfaces/joinfaces-maven-jar-example/issues).## Contributing
* Report documentation, features, enhancement and bugs at [github.com/joinfaces/joinfaces-example/issues](https://github.com/joinfaces/joinfaces-maven-jar-example/issues).
* Pull requests are welcome.