我正在使用Spring Netflix创建服务器配置。我已经配置了POM.XML,并且我添加了安全依赖项。我还配置了application.yml和bootstrap.yml文件。当我使用encrypt命令调用服务器以返回执行的密钥时,服务器响应:
Whitelabel错误页面
这个应用程序没有/ error的显式映射,所以你看到了 这是一个后备。
Thu Jul 23 10:20:46 CEST 2015出现意外错误(type = Not 找到了,状态= 404)。没有可用的消息
电话:
Maven控制台:
2015-07-23 11:02:05.217 INFO 7948 --- [主要] s.b.c.e.t.TomcatEmbeddedServletContainer:Tomcat在端口上启动: 8888(http)2015-07-23 11:02:05.218 INFO 7948 --- [主要] nubbler.netflixserver.ConfigServerApp:已启动ConfigServerApp 5.106秒(JVM运行5.922)2015-07-23 11:02:13.765 INFO 7948 --- [nio-8888-exec-1] o.a.c.c.C. [Tomcat]。[localhost]。[/]: 初始化Spring FrameworkServlet'dispatcherServlet'2015-07-23 11:02:13.766 INFO 7948 --- [nio-8888-exec-1] o.s.web.servlet.DispatcherServlet:FrameworkServlet 'dispatcherServlet':初始化开始于2015-07-23 11:02:13.785 INFO 7948 --- [nio-8888-exec-1] o.s.web.servlet.DispatcherServlet
:FrameworkServlet'dispatcherServlet':初始化完成于19 ms 2015-07-23 11:02:13.885 INFO 7948 --- [nio-8888-exec-1] o.s.b.a.audit.listener.AuditListener:AuditEvent [timestamp = Thu 7月23日11:02:13 CEST 2015,principal = user, 键入= AUTHENTICATION_SUCCESS, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@b364: RemoteIpAddress:0:0:0:0:0:0:0:1; SessionId:null}]
¿有什么想法吗?我在jdk(jdk_1.8.0_40)中安装了JCE扩展,我检查过应用程序和maven使用了这个jdk。
application.yml:
server:
port: 8888
spring:
cloud:
config:
server:
git:
uri: https://github.com/xxxxx
basedir: target/config
security:
user:
password: s3cret
bootstrap.yml:
spring:
encrypt:
key: foobar
的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>nubbler</groupId>
<artifactId>netflixserver</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.5.RELEASE</version>
</parent>
<name>netflixserver</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>1.0.3.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
</dependencies>
</project>