Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix of java-enabler and helloworld-jersey (#174)
* TLS error handling improvement * WIP! * ApimlEurekaInstanceConfig * Add missing files * Fix problem with registering * Remove hardcode ip value and add ui routes * Set IBM-1047 encoding for IBM Java only on z/OS * Set virtual hostname * Fix greeting controller routing * Fix routing for /application/* routes through GW * Fix api documentation endpoint * Fix hellospring unit tests and integration tests and remove integration-enabler-jersey reference from gradle files * Use same style in build.gradle to be consistent with other dependencies
- Loading branch information
Showing
38 changed files
with
412 additions
and
562 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
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
36 changes: 36 additions & 0 deletions
36
helloworld-jersey/src/main/java/com/ca/hwsjersey/listener/ApiDiscoveryListener.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,36 @@ | ||
/* | ||
* 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.hwsjersey.listener; | ||
|
||
import com.ca.mfaas.eurekaservice.client.ApiMediationClient; | ||
import com.ca.mfaas.eurekaservice.client.config.ApiMediationServiceConfig; | ||
import com.ca.mfaas.eurekaservice.client.impl.ApiMediationClientImpl; | ||
import com.ca.mfaas.eurekaservice.client.util.ApiMediationServiceConfigReader; | ||
|
||
import javax.servlet.ServletContextEvent; | ||
import javax.servlet.ServletContextListener; | ||
|
||
|
||
public class ApiDiscoveryListener implements ServletContextListener { | ||
private ApiMediationClient apiMediationClient; | ||
|
||
@Override | ||
public void contextInitialized(ServletContextEvent sce) { | ||
apiMediationClient = new ApiMediationClientImpl(); | ||
String configurationFile = "/service-configuration.yml"; | ||
ApiMediationServiceConfig config = new ApiMediationServiceConfigReader(configurationFile).readConfiguration(); | ||
apiMediationClient.register(config); | ||
} | ||
|
||
@Override | ||
public void contextDestroyed(ServletContextEvent sce) { | ||
apiMediationClient.unregister(); | ||
} | ||
} |
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
45 changes: 45 additions & 0 deletions
45
helloworld-jersey/src/main/java/com/ca/hwsjersey/resource/DiscoveryController.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,45 @@ | ||
/* | ||
* 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.hwsjersey.resource; | ||
|
||
import com.ca.mfaas.eurekaservice.model.Health; | ||
import com.ca.mfaas.eurekaservice.model.InstanceInfo; | ||
import io.swagger.annotations.ApiOperation; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.core.MediaType; | ||
import java.util.HashMap; | ||
|
||
|
||
@Path("/api/v1/application") | ||
public class DiscoveryController { | ||
|
||
@GET | ||
@Path("/info") | ||
@Produces(MediaType.APPLICATION_JSON) | ||
@ApiOperation(value = "Send the application info", | ||
notes = "Send a application info to the caller", | ||
response = InstanceInfo.class) | ||
public Object getDiscoveryInfo() { | ||
return new HashMap<String, String>(); | ||
} | ||
|
||
@GET | ||
@Path("/health") | ||
@Produces(MediaType.APPLICATION_JSON) | ||
@ApiOperation(value = "Send the health status", | ||
notes = "Send a status greeting to the caller", | ||
response = Health.class) | ||
public Object getHealth() { | ||
return new Health("UP"); | ||
} | ||
} |
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
112 changes: 0 additions & 112 deletions
112
helloworld-jersey/src/main/resources/eureka-client.properties
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.