Je crée une configuration de serveur avec Spring Netflix. J'ai configuré le POM.XML et j'ai ajouté la dépendance de sécurité. J'ai également configuré les fichiers application.yml et bootstrap.yml. Quand j'appelle au serveur avec la commande Chiffrer pour renvoie la clé encripted, les réponses du serveur:Printemps netflix config serveur ne retourne pas clé cryptée
Whitelabel page d'erreur
Cette application n'a pas de mappage explicite/erreur, vous voyez cela comme un repli.
Jeu 23 juillet 10:20:46 CEST 2015 Une erreur inattendue s'est produite (type = Non Found, status = 404). Aucun message disponible
L'appel:
console Maven:
2015-07-23 11: 02: 05,217 INFO 7948 - - [principal] sbcetTomcatEmbeddedServletContainer: Tomcat a démarré sur le (s) port (s): 8888 (http) 20 15-07-23 11: 02: 05.218 INFO 7948 --- [principal] nubbler.netflixserver.ConfigServerApp: a démarré ConfigServerApp en 5,166 secondes (JVM en cours d'exécution pour 5,922) 2015-07-23 11: 02: 13.765 INFO 7948 - - [nio-8888-exec-1] oaccC [Tomcat]. [localhost]. [/]: Initialisation de Spring FrameworkServlet 'dispatcherServlet' 2015-07-23 11: 02: 13.766 INFO 7948 --- [nio- 8888-exec-1] osweb.servlet.DispatcherServlet: FrameworkServlet 'dispatcherServlet': initialisation démarrée 2015-07-23 11: 02: 13.785 INFO 7948 --- [nio-8888-exec-1] osweb. servlet.DispatcherServlet
: FrameworkServlet 'dispatcherServlet': initialisation terminée en 19 ms 2015-07-23 11: 02: 13.885 INFO 7948 --- [nio-8888-exec-1] osbaaudit.listener.AuditListener: AuditEvent [timestamp = jeu 23 juillet 11:02:13 CEST 2015, principale = utilisateur, type = AUTHENTICATION_SUCCESS, data = {détails = org.springframework.security.web.authentication.WebAuthenticationDetails @ b364: RemoteIpAddress: 0: 0: 0: 0: 0: 0: 1; SessionId: null}]
Une idée? J'ai installé des extensions JCE dans le jdk (jdk_1.8.0_40) et j'ai vérifié que l'application et maven utilisent ce 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>