Skip to content

Commit

Permalink
AAE-29293 Add ServerTime controller
Browse files Browse the repository at this point in the history
  • Loading branch information
shsahahyland committed Dec 11, 2024
1 parent c803fd4 commit e45119b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.activiti.cloud.identity.config.IdentitySearchCacheConfiguration;
import org.activiti.cloud.identity.web.controller.IdentityManagementController;
import org.activiti.cloud.identity.web.controller.IdentityManagementRestExceptionHandler;
import org.activiti.cloud.identity.web.controller.ServerTimeController;
import org.springframework.context.annotation.Import;

/**
Expand All @@ -37,6 +38,7 @@
IdentityManagementController.class,
IdentityManagementRestExceptionHandler.class,
IdentitySearchCacheConfiguration.class,
ServerTimeController.class,
}
)
public @interface EnableIdentityManagementRestAPI {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright 2017-2020 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.activiti.cloud.identity.web.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "${activiti.cloud.services.identity.url:/v1}")
public class ServerTimeController {

@GetMapping(value = "/server/time")
public String getServerTime() {
return String.valueOf(System.currentTimeMillis());
}
}

0 comments on commit e45119b

Please sign in to comment.