maven Sping Boot 2.6应用程序上WildFly 19 -无法访问我的应用程序

xyhw6mcr  于 2023-04-29  发布在  Maven
关注(0)|答案(1)|浏览(173)

我有一个Java API Sping Boot 应用程序(2.6.0-SNAPSHOT)没有任何上下文,也有一个在VueJS中编写的前端路径/src/main/resources/static,在我的本地开发环境中,当我运行项目时,我可以通过url localhost:8080查看前端应用程序,并可以通过url例如localhost:8080/security/myEndpoint访问Sping Boot 中的API项目,一切都很好。
现在,我需要在WildFly 19应用服务器(wildfly-19.0.0.Final),首先我使用maven构建war文件,然后将其放入\standalone\deployments\路径进行部署。
当我执行standalone文件来启动部署时,服务器完成了所有过程并启动正常,但我试图访问我的前端应用程序或API端点并获得404错误。
此配置缺少什么,才能获得与我的开发环境相同的功能?
我的pom.xml文件

<?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.6.0-SNAPSHOT</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.co.myapp</groupId>
<artifactId>RED</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>RED</name>
<description>My app</description>
<properties>
    <java.version>11</java.version>
</properties>
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-ldap</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-jersey</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-mail</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-quartz</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-tomcat</artifactId>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.springdoc</groupId>
      <artifactId>springdoc-openapi-ui</artifactId>
      <version>1.5.10</version>
   </dependency>
    
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <excludes>
                    <exclude>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                    </exclude>
                </excludes>
            </configuration>
        </plugin>
    </plugins>
</build>
<repositories>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/snapshot</url>
        <releases>
            <enabled>false</enabled>
        </releases>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
    <pluginRepository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/snapshot</url>
        <releases>
            <enabled>false</enabled>
        </releases>
    </pluginRepository>
</pluginRepositories>

主要类别

@SpringBootApplication
@EnableScheduling
@PropertySource(value = "file:${spring.config.location}/applicationconfig.properties")
@PropertySource(value = "file:${spring.config.location}/propiedades.properties")
public class BackRedApplication extends SpringBootServletInitializer {

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
    return application.sources(BackRedApplication.class);
}

public static void main(String[] args) {
    SpringApplication.run(BackRedApplication.class, args);
}

@Bean
public static PropertySourcesPlaceholderConfigurer placeHolderConfigurer() {
   return new PropertySourcesPlaceholderConfigurer();
}
}

我的 www.example.com

spring.servlet.multipart.max-file-size=250MB
spring.servlet.multipart.max-request-size=250MB
spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
#spring.profiles.active=dev
#spring.profiles.active=test
#spring.config.location=path_to_my_spring_configuration
#server.servlet.context-path=/api-red

#
#spring.mvc.static-path-pattern=/uploads/**
#spring.web.resources.static-locations=file:/opt/files

我的 www.example.com (定义在主类上)

#
spring.datasource.jdbc-url=jdbc:mysql://mydb.com:3306/MYDB
spring.datasource.username=user
spring.datasource.password=password
spring.datasource.driverClassName=com.mysql.jdbc.Driver
server.port = 8080

springdoc.packagesToScan=the_package_to_scan
#springdoc.pathsToMatch=/v1, /api/balance/**

spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.properties.hibernate.format_sql=true

#Generate camelCase columns names in DB as delcared in Entities
spring.jpa.hibernate.naming.physical- 
strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

logging.level.org.hibernate.SQL=DEBUG
#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE

WildFly Log的一部分

2021-10-26 00:47:21,142 INFO  [stdout] (ServerService Thread Pool -- 92) ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

2021-10-26 00:47:21,142 INFO  [stdout] (ServerService Thread Pool -- 92)  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )

2021-10-26 00:47:21,142 INFO  [stdout] (ServerService Thread Pool -- 92)   '  |____| .__|_| |_|_| |_\__, | / / / /

2021-10-26 00:47:21,143 INFO  [stdout] (ServerService Thread Pool -- 92)  =========|_|==============|___/=/_/_/_/

2021-10-26 00:47:21,143 INFO  [stdout] (ServerService Thread Pool -- 92)  :: Spring Boot ::       (v2.6.0-SNAPSHOT)

2021-10-26 00:47:21,144 INFO  [stdout] (ServerService Thread Pool -- 92) 

2021-10-26 00:47:21,146 INFO  [org.hibernate.validator.internal.util.Version] (background-preinit) HV000001: Hibernate Validator 6.0.18.Final
2021-10-26 00:47:21,186 INFO  [com.co.dejsoftware.red.BackRedApplication] (ServerService Thread Pool -- 92) Starting BackRedApplication using Java 11.0.12 on DAVID-DESKTOP with PID 4500 (started by david in C:\Users\david\Documents\Emprendimiento\CLIENTES_EXTERNOS\UTADEO\wildfly-19.0.0.Final\bin)
2021-10-26 00:47:21,187 INFO  [com.co.dejsoftware.red.BackRedApplication] (ServerService Thread Pool -- 92) No active profile set, falling back to default profiles: default
2021-10-26 00:47:21,635 INFO  [org.springframework.data.repository.config.RepositoryConfigurationDelegate] (ServerService Thread Pool -- 92) Multiple Spring Data modules found, entering strict repository configuration mode!
2021-10-26 00:47:21,637 INFO  [org.springframework.data.repository.config.RepositoryConfigurationDelegate] (ServerService Thread Pool -- 92) Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-10-26 00:47:21,706 INFO  [org.springframework.data.repository.config.RepositoryConfigurationDelegate] (ServerService Thread Pool -- 92) Finished Spring Data repository scanning in 62 ms. Found 8 JPA repository interfaces.
2021-10-26 00:47:21,712 INFO  [org.springframework.data.repository.config.RepositoryConfigurationDelegate] (ServerService Thread Pool -- 92) Multiple Spring Data modules found, entering strict repository configuration mode!
2021-10-26 00:47:21,713 INFO  [org.springframework.data.repository.config.RepositoryConfigurationDelegate] (ServerService Thread Pool -- 92) Bootstrapping Spring Data LDAP repositories in DEFAULT mode.
2021-10-26 00:47:21,725 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.job.RepositorioCampaniasImportadas. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:21,726 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.RepositorioDomain. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:21,726 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.RepositorioRol. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:21,727 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.RepositorioSurvey. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:21,727 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.RepositorioSurveyQuestion. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:21,728 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.RepositorioSurveyQuestionAnswer. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:21,729 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.RepositorioSurveyQuestionAttribute. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:21,729 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.RepositorioUsers. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:21,729 INFO  [org.springframework.data.repository.config.RepositoryConfigurationDelegate] (ServerService Thread Pool -- 92) Finished Spring Data repository scanning in 15 ms. Found 0 LDAP repository interfaces.
2021-10-26 00:47:21,978 INFO  [io.undertow.servlet] (ServerService Thread Pool -- 92) Initializing Spring embedded WebApplicationContext
2021-10-26 00:47:21,979 INFO  [org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext] (ServerService Thread Pool -- 92) Root WebApplicationContext: initialization completed in 773 ms
2021-10-26 00:47:22,145 ERROR [stderr] (ServerService Thread Pool -- 92) Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

2021-10-26 00:47:22,253 INFO  [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 92) HHH000204: Processing PersistenceUnitInfo [name: default]
2021-10-26 00:47:22,301 INFO  [org.hibernate.Version] (ServerService Thread Pool -- 92) HHH000412: Hibernate ORM core version 5.6.0.Final
2021-10-26 00:47:22,424 INFO  [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 92) HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-10-26 00:47:22,493 INFO  [com.zaxxer.hikari.HikariDataSource] (ServerService Thread Pool -- 92) HikariPool-1 - Starting...
2021-10-26 00:47:22,497 WARN  [com.zaxxer.hikari.util.DriverDataSource] (ServerService Thread Pool -- 92) Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2021-10-26 00:47:23,851 INFO  [com.zaxxer.hikari.HikariDataSource] (ServerService Thread Pool -- 92) HikariPool-1 - Start completed.
2021-10-26 00:47:23,862 INFO  [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 92) HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
2021-10-26 00:47:23,988 INFO  [org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator] (ServerService Thread Pool -- 92) HHH000490: Using JtaPlatform implementation: [org.springframework.boot.orm.jpa.hibernate.SpringJtaPlatform]
2021-10-26 00:47:30,064 INFO  [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] (ServerService Thread Pool -- 92) Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-10-26 00:47:30,896 WARN  [org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration$JpaWebConfiguration] (ServerService Thread Pool -- 92) spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2021-10-26 00:47:31,104 INFO  [org.springframework.boot.autoconfigure.web.servlet.WelcomePageHandlerMapping] (ServerService Thread Pool -- 92) Adding welcome page: class path resource [static/index.html]
2021-10-26 00:47:32,432 INFO  [org.springframework.ldap.core.support.AbstractContextSource] (ServerService Thread Pool -- 92) Property 'userDn' not set - anonymous context will be used for read-write operations
2021-10-26 00:47:32,481 INFO  [org.quartz.impl.StdSchedulerFactory] (ServerService Thread Pool -- 92) Using default implementation for ThreadExecutor
2021-10-26 00:47:32,494 INFO  [org.quartz.core.SchedulerSignalerImpl] (ServerService Thread Pool -- 92) Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
2021-10-26 00:47:32,495 INFO  [org.quartz.core.QuartzScheduler] (ServerService Thread Pool -- 92) Quartz Scheduler v.2.3.2 created.
2021-10-26 00:47:32,496 INFO  [org.quartz.simpl.RAMJobStore] (ServerService Thread Pool -- 92) RAMJobStore initialized.
2021-10-26 00:47:32,497 INFO  [org.quartz.core.QuartzScheduler] (ServerService Thread Pool -- 92) Scheduler meta-data: Quartz Scheduler (v2.3.2) 'quartzScheduler' with instanceId 'NON_CLUSTERED'
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
  Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

2021-10-26 00:47:32,497 INFO  [org.quartz.impl.StdSchedulerFactory] (ServerService Thread Pool -- 92) Quartz scheduler 'quartzScheduler' initialized from an externally provided properties instance.
2021-10-26 00:47:32,498 INFO  [org.quartz.impl.StdSchedulerFactory] (ServerService Thread Pool -- 92) Quartz scheduler version: 2.3.2
2021-10-26 00:47:32,498 INFO  [org.quartz.core.QuartzScheduler] (ServerService Thread Pool -- 92) JobFactory set to: org.springframework.scheduling.quartz.SpringBeanJobFactory@435e5276
2021-10-26 00:47:32,527 INFO  [org.springframework.scheduling.quartz.SchedulerFactoryBean] (ServerService Thread Pool -- 92) Starting Quartz Scheduler now
2021-10-26 00:47:32,528 INFO  [org.quartz.core.QuartzScheduler] (ServerService Thread Pool -- 92) Scheduler quartzScheduler_$_NON_CLUSTERED started.
2021-10-26 00:47:32,542 INFO  [com.co.dejsoftware.red.BackRedApplication] (ServerService Thread Pool -- 92) Started BackRedApplication in 11.605 seconds (JVM running for 19.378)
2021-10-26 00:47:32,545 INFO  [com.co.dejsoftware.red.ServletInitializer] (ServerService Thread Pool -- 92) Root context already created (using as parent).
2021-10-26 00:47:32,582 INFO  [stdout] (ServerService Thread Pool -- 92) 

2021-10-26 00:47:32,583 INFO  [stdout] (ServerService Thread Pool -- 92)   .   ____          _            __ _ _

2021-10-26 00:47:32,585 INFO  [stdout] (ServerService Thread Pool -- 92)  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \

2021-10-26 00:47:32,590 INFO  [stdout] (ServerService Thread Pool -- 92) ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

2021-10-26 00:47:32,591 INFO  [stdout] (ServerService Thread Pool -- 92)  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )

2021-10-26 00:47:32,591 INFO  [stdout] (ServerService Thread Pool -- 92)   '  |____| .__|_| |_|_| |_\__, | / / / /

2021-10-26 00:47:32,592 INFO  [stdout] (ServerService Thread Pool -- 92)  =========|_|==============|___/=/_/_/_/

2021-10-26 00:47:32,592 INFO  [stdout] (ServerService Thread Pool -- 92)  :: Spring Boot ::       (v2.6.0-SNAPSHOT)

2021-10-26 00:47:32,593 INFO  [stdout] (ServerService Thread Pool -- 92) 

2021-10-26 00:47:32,596 INFO  [com.co.dejsoftware.red.ServletInitializer] (ServerService Thread Pool -- 92) No active profile set, falling back to default profiles: default
2021-10-26 00:47:32,777 INFO  [org.springframework.data.repository.config.RepositoryConfigurationDelegate] (ServerService Thread Pool -- 92) Multiple Spring Data modules found, entering strict repository configuration mode!
2021-10-26 00:47:32,777 INFO  [org.springframework.data.repository.config.RepositoryConfigurationDelegate] (ServerService Thread Pool -- 92) Bootstrapping Spring Data LDAP repositories in DEFAULT mode.
2021-10-26 00:47:32,791 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.job.RepositorioCampaniasImportadas. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:32,792 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.RepositorioDomain. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:32,793 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.RepositorioRol. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:32,793 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.RepositorioSurvey. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:32,794 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.RepositorioSurveyQuestion. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:32,794 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.RepositorioSurveyQuestionAnswer. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:32,795 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.RepositorioSurveyQuestionAttribute. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:32,795 INFO  [org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport] (ServerService Thread Pool -- 92) Spring Data LDAP - Could not safely identify store assignment for repository candidate interface com.co.dejsoftware.red.repositorios.RepositorioUsers. If you want this repository to be a LDAP repository, consider annotating your entities with one of these annotations: org.springframework.ldap.odm.annotations.Entry (preferred), or consider extending one of the following types with your repository: org.springframework.data.ldap.repository.LdapRepository.
2021-10-26 00:47:32,795 INFO  [org.springframework.data.repository.config.RepositoryConfigurationDelegate] (ServerService Thread Pool -- 92) Finished Spring Data repository scanning in 16 ms. Found 0 LDAP repository interfaces.
2021-10-26 00:47:32,823 INFO  [io.undertow.servlet] (ServerService Thread Pool -- 92) Initializing Spring embedded WebApplicationContext
2021-10-26 00:47:32,823 INFO  [org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext] (ServerService Thread Pool -- 92) Root WebApplicationContext: initialization completed in 221 ms
2021-10-26 00:47:32,830 INFO  [org.springframework.boot.web.servlet.RegistrationBean] (ServerService Thread Pool -- 92) Filter errorPageFilter was not registered (possibly already registered?)
2021-10-26 00:47:32,830 INFO  [org.springframework.boot.web.servlet.RegistrationBean] (ServerService Thread Pool -- 92) Filter vueRoutePathFilter was not registered (possibly already registered?)
2021-10-26 00:47:32,915 INFO  [com.co.dejsoftware.red.ServletInitializer] (ServerService Thread Pool -- 92) Started ServletInitializer in 0.368 seconds (JVM running for 19.751)
2021-10-26 00:47:32,957 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 92) Initializing Mojarra 2.3.9.SP06 for context '/api-red'
2021-10-26 00:47:34,146 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 92) WFLYUT0021: Registered web context: '/api-red' for server 'default-server'
2021-10-26 00:47:34,177 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 45) WFLYSRV0010: Deployed "RED-0.0.1-SNAPSHOT.war" (runtime-name : "RED-0.0.1-SNAPSHOT.war")
2021-10-26 00:47:34,204 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
2021-10-26 00:47:34,206 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
2021-10-26 00:47:34,207 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
2021-10-26 00:47:34,208 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 19.0.0.Final (WildFly Core 11.0.0.Final) started in 20962ms - Started 539 of 768 services (379 services are lazy, passive or on-demand)

WildFly独立版。XML

Sping Boot 项目上的VueJS应用路径:

本地开发环境中的前端

本地开发环境中的后端

WildFly环境执行

WildFly环境上的前端执行

WildFly环境上的后端执行

tct7dpnv

tct7dpnv1#

您可以尝试以下maven依赖项更改:

<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>
    <!-- We need to include the javax.servlet API specs, the implementation 
         will be provided by Wildfly / JBoss / Tomcat -->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <scope>provided</scope>
    </dependency>
...

而不是

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <scope>provide</scope>
</dependency>

相关问题