-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Us601302 onboarding spring enabler na (#480)
* US601302# Buildable, Runnable: Onboarding enabler spring, v1, v2, disco client. Bad config. * US601302: Change service onboarding config according to new PJE config format * US601302: resolve PR#466 comments From Ilkin: 2. EurekaClientWrapper 3x 3. ApiMlLogger Configuration 6.7. eureka.* properties 9. config/local/* vs application.yml - clean up 10. discoverableclient2 and discoverableclient. Still needed to check configs and clean comments * US601302: Clean app config * US601302: logging in spring enabler event listener * US601302: Add dummy tests classes for onboarding enablers (required by sonarqube); Change springfox version * US601302: Exclude onboarding-enabler-spring-v1 from sonarqube analysis * US601302: Exclude onboarding-enabler-spring-v2 from sonarqube analysis * US601302# Buildable, Runnable: Onboarding enabler spring, v1, v2, disco client. Bad config. * US601302: Change service onboarding config according to new PJE config format * US601302: resolve PR#466 comments From Ilkin: 2. EurekaClientWrapper 3x 3. ApiMlLogger Configuration 6.7. eureka.* properties 9. config/local/* vs application.yml - clean up 10. discoverableclient2 and discoverableclient. Still needed to check configs and clean comments * US601302: Clean app config * US601302: logging in spring enabler event listener * US601302: Add dummy tests classes for onboarding enablers (required by sonarqube); Change springfox version * US601302: Exclude onboarding-enabler-spring-v1 from sonarqube analysis * US601302: Exclude onboarding-enabler-spring-v2 from sonarqube analysis * US601302: Improve spring beans usage Substitute EurekaClientWrapper with ApiMediationClient, which holds EurekaClient. Temporarily commented out spring enabler tests due to spring configuration properties issues. * US601302: get rid of EurekaClientWrapper * US601302: Improve APIML seervice registration flow Unregister first if registration called repeatedly; Add log messages * US601302: Remove unused Config and Bean classes * US601392: Improvements - App Context configuration - Unit tests properties and profile - Apiml logging - Context reload - Unregister - Autowiring * US601302: Service YAML configuration * US601302: Resolve PRR comments * US601302: Process PRR comments * US601302: Format of @import single class * FIX: jacoco failing on Jenkins * changed IDEA setup parameter for launching services from Spring's Services dashboard Signed-off-by: Elena Kubantseva <[email protected]> * fixed apidoc * US601302: Solve review issues * tmp commit: added additional log messages Signed-off-by: Elena Kubantseva <[email protected]> * US601302: Unregister from DiscoServ on ContextClosedEvent * US601302: Fix - Swagger ApiParam example number value not set throws exception * US601302: Removed deprecated description in Swagger api-doc * US601302: Setting config to newConfig to. Handling closing context event by unregistering from DS. * US601302: Rename _config to newConfig * US601302: Clean comment and TODO * US601302: Remove obsolete comments * US601302: Fix apiml.service.ssl referencing server.ssl properties * US601302: Fix externalized apiml.service.properties * US601302: Process PR review comments * US601302: Move ApimlEurekaInstanceConfig. Clean-up comments and ext config obsolet settings * US601302: Chenge order of apiml and server segments, because on MF -D properties set primarily the apiml. segment * US602301: Reverse order of apiml: and server: config segments * US602301: Reverse order of apiml: and server: config segments * US601302: Move ssl properties to additional config file. Expected to be set from -D on mainframe * US601302: Chenge order of apiml and server segments, because on MF -D properties set primarily the apiml. segment * US601302: Remaster config; removed empty tests class * US601302: 1. DC config of spring.address; 2. Integration tests dependency on jackson modules * US601302: WIP: Set server.addres s to apiml.service.ipAddress * US601302: FIX: WebsocketTEst, Encoding characters * US601302: FIX - @Ingore integartion test for encoded characters. Must introduce configuration first in following story. * US601302: Fix websocket jetty implementation version string format. Co-authored-by: pz891284 <[email protected]> Co-authored-by: Elena Kubantseva <[email protected]> Co-authored-by: Ilkin <[email protected]>
- Loading branch information
1 parent
3e3a532
commit 8b3b548
Showing
96 changed files
with
1,025 additions
and
436 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
dependencies { | ||
compile(project(':common-service-core')) | ||
|
||
compile libraries.spring_boot_starter_web | ||
compile libraries.commons_validator | ||
compile libraries.jackson_databind | ||
compile libraries.apache_commons_lang3 | ||
compile libraries.http_client | ||
compile libraries.http_core | ||
compile libraries.jetty_websocket_client | ||
|
||
compileOnly libraries.spring_boot_configuration_processor | ||
compileOnly libraries.lombok | ||
|
||
testCompile libraries.javax_servlet_api | ||
testCompile libraries.spring_boot_starter_test | ||
testCompile libraries.powermock_api_mockito2 | ||
testCompile libraries.power_mock_junit4 | ||
testCompile libraries.power_mock_junit4_rule | ||
testCompile libraries.lombok | ||
//testCompile libraries.gson | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,41 @@ | ||
spring.profiles.include: diag | ||
|
||
apiml: | ||
service: | ||
hostname: localhost | ||
ipAddress: 127.0.0.1 | ||
port: 10012 | ||
discoveryServiceUrls: https://localhost:10011/eureka/ | ||
|
||
spring: | ||
profiles: | ||
include: diag | ||
output: | ||
ansi: | ||
enabled: always | ||
|
||
apiml: | ||
security: | ||
ssl: | ||
ciphers: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 | ||
# The `apiml` node contains API Mediation Layer specific configuration | ||
service: | ||
# The `apiml.service` node contains information required by any APIML service | ||
id: discoverableclient # Service ID of this service | ||
hostname: localhost # Hostname that is advertised in Eureka. Default is valid only for localhost | ||
port: 10012 # Default port name for discoverable-clinet service | ||
ipAddress: 127.0.0.1 # IP address that is advertised in Eureka. Default is valid only for localhost | ||
preferIpAddress: false | ||
discoveryServiceUrls: https://localhost:10011/eureka/ | ||
|
||
server: | ||
ssl: | ||
keyAlias: localhost | ||
keyPassword: password | ||
keyStore: keystore/localhost/localhost.keystore.p12 | ||
# keyStore: keystore/selfsigned/localhost.keystore.p12 | ||
# keyStore: keystore/selfsigned/localhost-untrusted.keystore.p12 | ||
keyStorePassword: password | ||
keyStoreType: PKCS12 | ||
trustStore: keystore/localhost/localhost.truststore.p12 | ||
# trustStore: keystore/selfsigned/localhost.truststore.p12 | ||
# trustStore: keystore/selfsigned/localhost-untrusted.truststore.p12 | ||
trustStorePassword: password | ||
trustStoreType: PKCS12 | ||
|
||
eureka: | ||
client: | ||
enabled: true | ||
serviceUrl: | ||
defaultZone: ${apiml.service.discoveryServiceUrls} | ||
instance: | ||
metadata-map: | ||
discovery: | ||
service: | ||
title: Service Spring Integration Enabler sample application API | ||
description: Sample API services to demonstrate Spring Integration Enabler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...overable-client/src/main/java/com/ca/mfaas/client/configuration/SwaggerConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* This program and the accompanying materials are made available under the terms of the | ||
* Eclipse Public License v2.0 which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Copyright Contributors to the Zowe Project. | ||
*/ | ||
package com.ca.mfaas.client.configuration; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import springfox.documentation.builders.PathSelectors; | ||
import springfox.documentation.builders.RequestHandlerSelectors; | ||
import springfox.documentation.service.ApiInfo; | ||
import springfox.documentation.spi.DocumentationType; | ||
import springfox.documentation.spring.web.plugins.Docket; | ||
import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||
|
||
import java.util.Collections; | ||
|
||
@Configuration | ||
@EnableSwagger2 | ||
public class SwaggerConfiguration { | ||
|
||
@Value("${apiml.service.title}") | ||
private String apiTitle; | ||
|
||
@Value("${apiml.service.apiInfo[0].version}") | ||
private String apiVersion; | ||
|
||
@Value("${apiml.service.description}") | ||
private String apiDescription; | ||
|
||
@Bean | ||
public Docket api() { | ||
return new Docket(DocumentationType.SWAGGER_2) | ||
.select() | ||
.apis(RequestHandlerSelectors.any()) | ||
.paths(PathSelectors.ant("/api/v1/**")) | ||
.build() | ||
.apiInfo( | ||
new ApiInfo( | ||
apiTitle, | ||
apiDescription, | ||
apiVersion, | ||
null, | ||
null, | ||
null, | ||
null, | ||
Collections.emptyList() | ||
) | ||
); | ||
} | ||
} |
Oops, something went wrong.