Spirng boot

Post Reply
rotmen
Posts: 4
Joined: 06 Jun 2021, 04:25

13 Aug 2021, 04:21

How to implementation mys theme in the proyect of spring boot can i help me please

siris
Posts: 322
Joined: 29 Jul 2019, 13:57

13 Aug 2021, 09:12

Hi,

I don't know what type of spring configuration you are using. However, you need to transfer some configurations in web.xml to "src/main/resources/application.properties" file or a similar file. Your issue seems to stem from this.

Let me show you our example joinfaces configuration:

Code: Select all

joinfaces.primefaces.theme=olympia-#{guestPreferences.componentTheme}
joinfaces.jsf.facelets-libraries=/WEB-INF/primefaces-olympia.taglib.xml
joinfaces.jsf.webapp-resources-directory=/resources
Best Regards,

rotmen
Posts: 4
Joined: 06 Jun 2021, 04:25

13 Aug 2021, 18:18

hi i have this error

Error de expresión: objeto con nombre: org.primefaces.component.OlympiaMenu no encontrado.

when incluide in my application properties this configuration

joinfaces.primefaces.theme=olympia-#{guestPreferences.componentTheme}
joinfaces.jsf.facelets-libraries=/WEB-INF/primefaces-olympia.taglib.xml
joinfaces.jsf.webapp-resources-directory=/resources

this my pom

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>mx.portal</groupId>
<artifactId>Aloyalit</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Aloyalit</name>
<description>aplication for my web company</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<joinfaces.version>4.5.3</joinfaces.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.joinfaces</groupId>
<artifactId>joinfaces-dependencies</artifactId>
<version>${joinfaces.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>



<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.security</groupId>
<artifactId>xml-security-impl</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>

<dependency>
<groupId>org.joinfaces</groupId>
<artifactId>primefaces-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
<version>5.12.0</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>10.0.0</version>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.36.v20210114</version>
</plugin>
</plugins>
</build>

</project>

siris
Posts: 322
Joined: 29 Jul 2019, 13:57

16 Aug 2021, 06:53

Hi,

Your error tells org.primefaces.component.OlympiaMenu not found. So please check your projects menu file. Menu files are at tag/src/main/java/primefaces/component/* folder. Please copy and paste these files to your project. Than configure for your project please.

Best Regards,

rotmen
Posts: 4
Joined: 06 Jun 2021, 04:25

19 Aug 2021, 04:56

YES Menu files are at tag/src/main/java/primefaces/component/* folder. Please copy and paste these files to your project. Than configure for your project please.

DO MADE IT THIS CONFIGURATION I have the same error please help

Are there any video exmaple in spring boot?

siris
Posts: 322
Joined: 29 Jul 2019, 13:57

19 Aug 2021, 06:56

Hi,

We don't have any video samples for spring boot. We provide template support not server installation support. Spring boot installation is our users' own choice. The tag folder we have already include in zip is executable with the "mvn clean jetty:run" command or deployable with "mvn clean package" command.

I will give you an example pom.xml file though. By making these changes, you will be able to use your tag folder with spring boot. Version numbers may be outdated. You can replace it with current versions.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.4.2</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>org.primefaces</groupId>
    <artifactId>olympia</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>war</packaging>
    
    <properties>
        <java.version>1.8</java.version>
        <joinfaces.version>4.4.2</joinfaces.version>
        <hibernate-validator.version>5.0.1.Final</hibernate-validator.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.joinfaces</groupId>
                <artifactId>joinfaces-dependencies</artifactId>
                <version>${joinfaces.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.joinfaces</groupId>
            <artifactId>primefaces-spring-boot-starter</artifactId>
        </dependency>
        <!-- JEE dependencies -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>${hibernate-validator.version}</version>
        </dependency>
    </dependencies>

    <build>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.joinfaces</groupId>
                    <artifactId>joinfaces-maven-plugin</artifactId>
                    <version>${joinfaces.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>classpath-scan</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.joinfaces</groupId>
                <artifactId>joinfaces-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>
and please create this file "src/main/resources/application.properties" then write below configs into to it:

Code: Select all

joinfaces.primefaces.theme=olympia-#{guestPreferences.componentTheme}
joinfaces.primefaces.font-awesome=true
joinfaces.jsf.facelets-libraries=/WEB-INF/primefaces-olympia.taglib.xml
joinfaces.jsf.webapp-resources-directory=/resources
Best Regards,

Post Reply

Return to “Olympia - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests