这是一种在Cucumber Extent Reports 4中记录自定义语句的方法,而不是使用scenario.write方法

如何解决这是一种在Cucumber Extent Reports 4中记录自定义语句的方法,而不是使用scenario.write方法

我不想使用Scenario.write方法,但同时我需要将自定义语句记录在Cucumber Extent报告中。

我问这个问题的原因是,当我使用scenario.write方法时,它将所有情境语句打印到范围报告中的所有输出,如所附的图像所示。

因此,我不确定是否有其他替代方法可以解决我的问题,有人可以请他们介绍一下,并为此提供解决方案。

下面是我的亚军课

@CucumberOptions(features = { "classpath:featurefile" },glue = { "classpath:com.inspire.brands.test.stepdefinition","classpath:com.inspire.brands.helper" },plugin = { "pretty","json:target/InspireBrands.json","com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:" },monochrome = true,tags = {
                        "@Api"})



public class InspireBrandsTestRunner extends AbstractTestNGCucumberTests {
            
    @AfterClass(alwaysRun = true)
    public static void writeExtentReport() {
            
        ReporterUtil.archiveReport();
                
    }

enter image description here

Below is my Pom.xml

<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>InspireBrands</groupId>
    <artifactId>InspireBrands</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <aspectj.version>1.7.4</aspectj.version>
        <allure.version>1.4.22</allure.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.surefire.verion>2.22.0</maven.surefire.verion>
        <io.cucumber.verion>4.2.0</io.cucumber.verion>

    </properties>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <!-- <configuration> <source>${maven.compiler.source}</source> <target>${maven.compiler.target}</target> 
                    <fork>true</fork> <executable>C:\Program Files\Java\jdk1.8.0_191\bin\javac</executable> 
                    </configuration> -->
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/test-classes</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.0</version>
                <configuration>
                    <systemPropertyVariables>
                        <propertyName>java.library.path</propertyName>
                        <buildDirectory>src/main/resources/configFile</buildDirectory>
                        
                        <cucumber.options>${cucumber.options}</cucumber.options>
                        
                    </systemPropertyVariables>
                    <testFailureIgnore>true</testFailureIgnore>
                    <argLine>
                        -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
                    </argLine>
                    <properties>
                        <property>
                            <name>dataproviderthreadcount</name>
                            <value>2</value>
                        </property>
                    </properties>
                    <suiteXmlFiles>
                
                        <suiteXmlFile>src/test/java/com/inspire/brands/test/testng/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.2.10.v20150310</version>
            </plugin>
            <!-- <plugin> <groupId>ch.fortysix</groupId> <artifactId>maven-postman-plugin</artifactId> 
                <version>0.1.6</version> <executions> <execution> <id>send_an_email</id> 
                <phase>test</phase> <goals> <goal>send-mail</goal> </goals> <inherited>false</inherited> 
                <configuration> <mailhost>smtp.gmail.com</mailhost> <mailport>465</mailport> 
                <mailauth>true</mailauth> <mailssl>true</mailssl> <mailAltConfig>true</mailAltConfig> 
                <mailuser>rydertest12@gmail.com</mailuser> <mailpassword>Ryder@123</mailpassword> 
                <from>rydertest12@gmail.com</from> <subject>UVS E-commerce Automation Report 
                </subject> <failonerror>true</failonerror> <htmlMessage> <![CDATA[ <p>Hi,</p> 
                <p>Check out the attached test execution report.</p> <p>From,</p> <p>Madhu 
                Golla</p> <p>UVS Automation Team</p> ]]> </htmlMessage> <receivers> <receiver>Madhu_Golla@ryder.com</receiver> 
                <receiver>rydertest12@gmail.com</receiver> </receivers> <fileSets> <fileSet> 
                <directory>${basedir}/Automation_Report/Reports</directory> <includes> <include>**/Report.html</include> 
                </includes> </fileSet> </fileSets> </configuration> </execution> </executions> 
                </plugin> -->
        </plugins>
    </build>

    <dependencies>
        <!--Cucumber Dependencies -->


        <!-- cucumber-java -->
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <!-- <version>${io.cucumber.verion}</version> -->
            <version>4.2.0</version>
        </dependency>

        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-jvm</artifactId>
            <!-- <version>5.1.0</version> -->
            <version>4.2.0</version>
            <type>pom</type>
        </dependency>

        <!--cucumber-jvm-deps <dependency> <groupId>io.cucumber</groupId> <artifactId>cucumber-jvm-deps</artifactId> 
            <version>1.0.6</version> </dependency> -->

        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-core</artifactId>
            <!-- <version>5.1.0</version> -->
            <version>4.2.0</version>
            <!-- <version>1.2.6</version> -->
        </dependency>

        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-gherkin</artifactId>
            <!-- <version>3.2.0</version> -->
            <version>5.1.0</version>
        </dependency>

        <!-- cucumber-testng -->
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-testng</artifactId>
            <!-- <version>${io.cucumber.verion}</version> -->
            <version>4.2.0</version>
        </dependency>

        <!-- cucumber-picocontainer -->
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-picocontainer</artifactId>
            <version>${io.cucumber.verion}</version>
        </dependency>



        <!-- https://mvnrepository.com/artifact/org.json/json -->
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20180813</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>4.1.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.github.cliftonlabs/json-simple -->
<dependency>
    <groupId>com.github.cliftonlabs</groupId>
    <artifactId>json-simple</artifactId>
    <version>3.1.0</version>
</dependency>
        

        <!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
        <!-- <dependency> <groupId>com.googlecode.json-simple</groupId> <artifactId>json-simple</artifactId> 
            <version>1.1.1</version> </dependency> -->



        <!-- Logging -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.5</version>
        </dependency>

        <!-- Extent Reports -->
        <!-- <dependency> <groupId>com.vimalselvam</groupId> <artifactId>cucumber-extentsreport</artifactId> 
            <version>3.0.2</version> </dependency> <dependency> <groupId>com.aventstack</groupId> 
            <artifactId>extentreports</artifactId> <version>3.1.2</version> </dependency> 
            <dependency> <groupId>com.relevantcodes</groupId> <artifactId>extentreports</artifactId> 
            <version>2.41.1</version> </dependency> -->

        <dependency>
            <groupId>com.aventstack</groupId>
            <artifactId>extentreports</artifactId>
            <version>4.0.9</version>
        </dependency>
        <!-- extentreports-cucumber4-adapter -->
        <dependency>
            <groupId>com.aventstack</groupId>
            <artifactId>extentreports-cucumber4-adapter</artifactId>
            <version>1.0.7</version>
        </dependency>

        <!-- Testng -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.14.3</version>
        </dependency>

        <!-- Selenium -->
        <!-- io.github.bonigarcia webdrivermanager -->

        <dependency>
            <groupId>io.github.bonigarcia</groupId>
            <artifactId>webdrivermanager</artifactId>
            <version>3.5.0</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-server</artifactId>
            <version>3.141.59</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>4.0.0-alpha-4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.paulhammant/ngwebdriver -->
        <dependency>
            <groupId>com.paulhammant</groupId>
            <artifactId>ngwebdriver</artifactId>
            <version>1.1.4</version>
        </dependency>

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-htmlunit-driver</artifactId>
            <version>2.52.0</version>
        </dependency>
        <!-- org.sikuli/sikuli-api -->
        <dependency>
            <groupId>org.sikuli</groupId>
            <artifactId>sikuli-api</artifactId>
            <version>1.2.0</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.10.1</version>
        </dependency>

        <!-- rest-assured-io -->
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>3.3.0</version>
        </dependency>
        <!-- SQL SERVER JDBC DRIVER --> 
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>7.2.1.jre8</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.fusesource.jansi/jansi -->

    </dependencies>
    <name>Inspire Brands</name>
</project>

解决方法

尝试所有不同的替代方法,但没有任何效果,只有一个对我真正有用的技巧是升级下面给出的一些依赖项

  • 范围报告
  • extentreports-cucumber4-adapter
  • 黄瓜测试
  • 黄瓜jvm
  • 黄瓜芯
  • 黄瓜java

下面是完整的pom.xml供参考

   <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>InspireBrands</groupId>
    <artifactId>InspireBrands</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <aspectj.version>1.7.4</aspectj.version>
        <allure.version>1.4.22</allure.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.surefire.verion>2.22.0</maven.surefire.verion>
        <io.cucumber.verion>4.2.0</io.cucumber.verion>

    </properties>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <!-- <configuration> <source>${maven.compiler.source}</source> <target>${maven.compiler.target}</target> 
                    <fork>true</fork> <executable>C:\Program Files\Java\jdk1.8.0_191\bin\javac</executable> 
                    </configuration> -->
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/test-classes</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.0</version>
                <configuration>
                    <systemPropertyVariables>
                        <propertyName>java.library.path</propertyName>
                        <buildDirectory>src/main/resources/configFile</buildDirectory>
                        
                        <cucumber.options>${cucumber.options}</cucumber.options>
                        
                    </systemPropertyVariables>
                    <testFailureIgnore>true</testFailureIgnore>
                    <argLine>
                        -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
                    </argLine>
                    <properties>
                        <property>
                            <name>dataproviderthreadcount</name>
                            <value>2</value>
                        </property>
                    </properties>
                    <suiteXmlFiles>
                
                        <suiteXmlFile>src/test/java/com/inspire/brands/test/testng/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.2.10.v20150310</version>
            </plugin>
            <!-- <plugin> <groupId>ch.fortysix</groupId> <artifactId>maven-postman-plugin</artifactId> 
                <version>0.1.6</version> <executions> <execution> <id>send_an_email</id> 
                <phase>test</phase> <goals> <goal>send-mail</goal> </goals> <inherited>false</inherited> 
                <configuration> <mailhost>smtp.gmail.com</mailhost> <mailport>465</mailport> 
                <mailauth>true</mailauth> <mailssl>true</mailssl> <mailAltConfig>true</mailAltConfig> 
                <mailuser>rydertest12@gmail.com</mailuser> <mailpassword>Ryder@123</mailpassword> 
                <from>rydertest12@gmail.com</from> <subject>UVS E-commerce Automation Report 
                </subject> <failonerror>true</failonerror> <htmlMessage> <![CDATA[ <p>Hi,</p> 
                <p>Check out the attached test execution report.</p> <p>From,</p> <p>Madhu 
                Golla</p> <p>UVS Automation Team</p> ]]> </htmlMessage> <receivers> <receiver>Madhu_Golla@ryder.com</receiver> 
                <receiver>rydertest12@gmail.com</receiver> </receivers> <fileSets> <fileSet> 
                <directory>${basedir}/Automation_Report/Reports</directory> <includes> <include>**/Report.html</include> 
                </includes> </fileSet> </fileSets> </configuration> </execution> </executions> 
                </plugin> -->
        </plugins>
    </build>

    <dependencies>
        <!--Cucumber Dependencies -->


        <!-- cucumber-java -->
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <!-- <version>${io.cucumber.verion}</version> -->
            <version>4.3.0</version>
        </dependency>

        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-jvm</artifactId>
            <!-- <version>5.1.0</version> -->
            <version>4.3.0</version>
            <type>pom</type>
        </dependency>

        <!--cucumber-jvm-deps <dependency> <groupId>io.cucumber</groupId> <artifactId>cucumber-jvm-deps</artifactId> 
            <version>1.0.6</version> </dependency> -->

        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-core</artifactId>
            <!-- <version>5.1.0</version> -->
            <version>4.3.0</version>
            <!-- <version>1.2.6</version> -->
        </dependency>

      <!-- cucumber-testng -->
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-testng</artifactId>
            <!-- <version>${io.cucumber.verion}</version> -->
            <!--<version>4.2.0</version>-->
            <version>4.3.0</version>
        </dependency>
        
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-gherkin</artifactId>
            <!-- <version>3.2.0</version> -->
            <version>5.1.0</version>
        </dependency>

        

        <!-- cucumber-picocontainer -->
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-picocontainer</artifactId>
            <version>${io.cucumber.verion}</version>
        </dependency>



        <!-- https://mvnrepository.com/artifact/org.json/json -->
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20180813</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>4.1.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.github.cliftonlabs/json-simple -->
<dependency>
    <groupId>com.github.cliftonlabs</groupId>
    <artifactId>json-simple</artifactId>
    <version>3.1.0</version>
</dependency>
        

        <!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
        <!-- <dependency> <groupId>com.googlecode.json-simple</groupId> <artifactId>json-simple</artifactId> 
            <version>1.1.1</version> </dependency> -->



        <!-- Logging -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.5</version>
        </dependency>

        <!-- Extent Reports -->
        <!-- <dependency> <groupId>com.vimalselvam</groupId> <artifactId>cucumber-extentsreport</artifactId> 
            <version>3.0.2</version> </dependency> <dependency> <groupId>com.aventstack</groupId> 
            <artifactId>extentreports</artifactId> <version>3.1.2</version> </dependency> 
            <dependency> <groupId>com.relevantcodes</groupId> <artifactId>extentreports</artifactId> 
            <version>2.41.1</version> </dependency> -->

        <dependency>
            <groupId>com.aventstack</groupId>
            <artifactId>extentreports</artifactId>
            <version>4.1.1</version>
        </dependency>
        
        <!-- extentreports-cucumber4-adapter -->
        <dependency>
            <groupId>com.aventstack</groupId>
            <artifactId>extentreports-cucumber4-adapter</artifactId>
            <version>1.0.11</version>
        </dependency>

        <!-- Testng -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.14.3</version>
        </dependency>
        

        <!-- Selenium -->
        <!-- io.github.bonigarcia webdrivermanager -->

        <dependency>
            <groupId>io.github.bonigarcia</groupId>
            <artifactId>webdrivermanager</artifactId>
            <version>3.5.0</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-server</artifactId>
            <version>3.141.59</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>4.0.0-alpha-4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.paulhammant/ngwebdriver -->
        <dependency>
            <groupId>com.paulhammant</groupId>
            <artifactId>ngwebdriver</artifactId>
            <version>1.1.4</version>
        </dependency>

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-htmlunit-driver</artifactId>
            <version>2.52.0</version>
        </dependency>
        <!-- org.sikuli/sikuli-api -->
        <dependency>
            <groupId>org.sikuli</groupId>
            <artifactId>sikuli-api</artifactId>
            <version>1.2.0</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.10.1</version>
        </dependency>

        <!-- rest-assured-io -->
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>3.3.0</version>
        </dependency>
        <!-- SQL SERVER JDBC DRIVER --> 
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>7.2.1.jre8</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.fusesource.jansi/jansi -->

    </dependencies>
    <name>Inspire Brands</name>
</project>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-
参考1 参考2 解决方案 # 点击安装源 协议选择 http:// 路径填写 mirrors.aliyun.com/centos/8.3.2011/BaseOS/x86_64/os URL类型 软件库URL 其他路径 # 版本 7 mirrors.aliyun.com/centos/7/os/x86
报错1 [root@slave1 data_mocker]# kafka-console-consumer.sh --bootstrap-server slave1:9092 --topic topic_db [2023-12-19 18:31:12,770] WARN [Consumer clie
错误1 # 重写数据 hive (edu)&gt; insert overwrite table dwd_trade_cart_add_inc &gt; select data.id, &gt; data.user_id, &gt; data.course_id, &gt; date_format(
错误1 hive (edu)&gt; insert into huanhuan values(1,&#39;haoge&#39;); Query ID = root_20240110071417_fe1517ad-3607-41f4-bdcf-d00b98ac443e Total jobs = 1
报错1:执行到如下就不执行了,没有显示Successfully registered new MBean. [root@slave1 bin]# /usr/local/software/flume-1.9.0/bin/flume-ng agent -n a1 -c /usr/local/softwa
虚拟及没有启动任何服务器查看jps会显示jps,如果没有显示任何东西 [root@slave2 ~]# jps 9647 Jps 解决方案 # 进入/tmp查看 [root@slave1 dfs]# cd /tmp [root@slave1 tmp]# ll 总用量 48 drwxr-xr-x. 2
报错1 hive&gt; show databases; OK Failed with exception java.io.IOException:java.lang.RuntimeException: Error in configuring object Time taken: 0.474 se
报错1 [root@localhost ~]# vim -bash: vim: 未找到命令 安装vim yum -y install vim* # 查看是否安装成功 [root@hadoop01 hadoop]# rpm -qa |grep vim vim-X11-7.4.629-8.el7_9.x
修改hadoop配置 vi /usr/local/software/hadoop-2.9.2/etc/hadoop/yarn-site.xml # 添加如下 &lt;configuration&gt; &lt;property&gt; &lt;name&gt;yarn.nodemanager.res