小编sre*_*vas的帖子

ConfigFileApplicationListener 已弃用,只能用作 EnvironmentPostProcessor

我正在尝试创建一个与身份验证服务集成的网关服务。api-网关/pom.xml

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.16.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.project</groupId>
    <artifactId>api-gateway</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>api-gateway</name>
    <description>Zuul Gateway</description>

    <properties>
        <java.version>11</java.version>
        <spring-cloud.version>Hoxton.SR9</spring-cloud.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
Run Code Online (Sandbox Code Playgroud)

对于这个项目,我在构建路径中添加了一个名为“Common”的应用程序。常见应用程序中有 3 个文件。JwtAuthenticationConfig JwtTokenAuthenticationFilter JwtUsernamePasswordAuthenticationFilter 我的工作来源是这个 …

java jwt spring-boot jjwt

3
推荐指数
1
解决办法
1万
查看次数

无法调用类型缺少调用签名的表达式。类型“typeof import("sweetalert2")”没有兼容的调用签名

我收到“无法调用类型缺少调用签名的表达式。类型 'typeof import("sweetalert2")' 没有兼容的调用签名。” 在角度中使用 SWAL 时出现此错误。

我的 package-cli.json 看起来像

    "ng2-sweetalert2": {
    "version": "0.0.8",
    "resolved": "https://registry.npmjs.org/ng2-sweetalert2/-/ng2-sweetalert2-0.0.8.tgz",
    "integrity": "sha1-+VkDV2dqeLIMf3eFTLVt/cJda0Q=",
    "requires": {
        "lodash.assign": "^4.0.8",
        "sweetalert2": "^5.2.0"
    },
    "dependencies": {
        "es6-promise": {
            "version": "4.2.6",
            "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz",
            "integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q=="
        },
        "sweetalert2": {
            "version": "5.3.8",
            "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-5.3.8.tgz",
            "integrity": "sha1-YALBhFPQYMQLnMVL+DoBDHHjlik=",
            "requires": {
                "es6-promise": "^4.2.6"
            }
        }
    }
}

"sweetalert2": {
      "version": "8.9.0",
      "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-8.9.0.tgz",
      "integrity": "sha512-gI+wL44QRbfd6FvRVB8KKLQPhD/8jP3XUNrvYGcSlU7IA09dQtQw3rrLCbM3c+HY0L3O8VTz1Gvu29n8ryIgag=="
}
Run Code Online (Sandbox Code Playgroud)

我在 package.json 依赖项中有以下内容

"dependencies":{
"ng2-sweetalert2": "0.0.8",
"sweetalert2": "^8.9.0",}
Run Code Online (Sandbox Code Playgroud)

在组件中我的代码如下所示

import * as swal from 'sweetalert2';

        swal({
          text: 'Login Successful!', …
Run Code Online (Sandbox Code Playgroud)

angular sweetalert2

2
推荐指数
1
解决办法
4111
查看次数

标签 统计

angular ×1

java ×1

jjwt ×1

jwt ×1

spring-boot ×1

sweetalert2 ×1