esoe
4 weeks ago
16 changed files with 309 additions and 207 deletions
@ -1,3 +1,9 @@ |
|||||||
{"@timestamp":"2024-10-23T06:23:27.800975600Z","log.level":"INFO","process.pid":18696,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.face.FaceApplicationTests","message":"Starting FaceApplicationTests using Java 17.0.7 with PID 18696 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\face)","ecs.version":"8.11"} |
{"@timestamp":"2024-10-25T05:51:49.542925200Z","log.level":"INFO","process.pid":9536,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.face.FaceApplicationTests","message":"Starting FaceApplicationTests using Java 17.0.7 with PID 9536 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\face)","ecs.version":"8.11"} |
||||||
{"@timestamp":"2024-10-23T06:23:27.814171300Z","log.level":"INFO","process.pid":18696,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.face.FaceApplicationTests","message":"The following 3 profiles are active: \"face\", \"source\", \"storage\"","ecs.version":"8.11"} |
{"@timestamp":"2024-10-25T05:51:49.558489700Z","log.level":"INFO","process.pid":9536,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.face.FaceApplicationTests","message":"The following 3 profiles are active: \"face\", \"source\", \"storage\"","ecs.version":"8.11"} |
||||||
{"@timestamp":"2024-10-23T06:23:29.758343700Z","log.level":"INFO","process.pid":18696,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.face.FaceApplicationTests","message":"Started FaceApplicationTests in 2.446 seconds (process running for 3.608)","ecs.version":"8.11"} |
{"@timestamp":"2024-10-25T05:51:51.532321800Z","log.level":"INFO","process.pid":9536,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.face.FaceApplicationTests","message":"Started FaceApplicationTests in 2.486 seconds (process running for 3.684)","ecs.version":"8.11"} |
||||||
|
{"@timestamp":"2024-10-25T05:55:37.500402200Z","log.level":"INFO","process.pid":21840,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.face.FaceApplicationTests","message":"Starting FaceApplicationTests using Java 17.0.7 with PID 21840 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\face)","ecs.version":"8.11"} |
||||||
|
{"@timestamp":"2024-10-25T05:55:37.507405500Z","log.level":"INFO","process.pid":21840,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.face.FaceApplicationTests","message":"The following 3 profiles are active: \"face\", \"source\", \"storage\"","ecs.version":"8.11"} |
||||||
|
{"@timestamp":"2024-10-25T05:55:39.368250700Z","log.level":"INFO","process.pid":21840,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.face.FaceApplicationTests","message":"Started FaceApplicationTests in 2.348 seconds (process running for 3.422)","ecs.version":"8.11"} |
||||||
|
{"@timestamp":"2024-10-25T06:00:05.447276500Z","log.level":"INFO","process.pid":2192,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.face.FaceApplicationTests","message":"Starting FaceApplicationTests using Java 17.0.7 with PID 2192 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\face)","ecs.version":"8.11"} |
||||||
|
{"@timestamp":"2024-10-25T06:00:05.454276700Z","log.level":"INFO","process.pid":2192,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.face.FaceApplicationTests","message":"The following 3 profiles are active: \"face\", \"source\", \"storage\"","ecs.version":"8.11"} |
||||||
|
{"@timestamp":"2024-10-25T06:00:07.297329800Z","log.level":"INFO","process.pid":2192,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.face.FaceApplicationTests","message":"Started FaceApplicationTests in 2.326 seconds (process running for 3.392)","ecs.version":"8.11"} |
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,58 @@ |
|||||||
|
package gsp.technologies.face.config; |
||||||
|
|
||||||
|
import java.util.HashMap; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
||||||
|
import org.springframework.stereotype.Component; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
@Data |
||||||
|
@Component |
||||||
|
@ConfigurationProperties(prefix = "face") |
||||||
|
public class FaceProperties { |
||||||
|
private Map<String, String> construct; |
||||||
|
private Map<String, String> api; |
||||||
|
private Map<String, String> face; |
||||||
|
|
||||||
|
/** |
||||||
|
* Методы извлечения CONSTRUCT |
||||||
|
*/ |
||||||
|
|
||||||
|
public String protocol() { |
||||||
|
return construct.get("protocol"); |
||||||
|
} |
||||||
|
public String domain() { |
||||||
|
return construct.get("domain"); |
||||||
|
} |
||||||
|
public String port() { |
||||||
|
return construct.get("port"); |
||||||
|
} |
||||||
|
public String prefix(){ |
||||||
|
return protocol() + "://" + domain() + ":" + port(); |
||||||
|
} |
||||||
|
public String hello() { |
||||||
|
return construct.get("hello"); |
||||||
|
} |
||||||
|
public String linkHello(){ |
||||||
|
return prefix() + hello(); |
||||||
|
} |
||||||
|
|
||||||
|
public Map<String, String> links(){ |
||||||
|
Map<String, String> links = new HashMap<>(); |
||||||
|
// перебираем api
|
||||||
|
for (Map.Entry<String, String> entry : api.entrySet()) { |
||||||
|
String link = prefix() + entry.getValue(); |
||||||
|
String key = "face.api." + entry.getKey(); |
||||||
|
links.put(key, link); |
||||||
|
} |
||||||
|
// перебираем face
|
||||||
|
for (Map.Entry<String, String> entry : face.entrySet()) { |
||||||
|
String link = prefix() + entry.getValue(); |
||||||
|
String key = "face.face." + entry.getKey(); |
||||||
|
links.put(key, link); |
||||||
|
} |
||||||
|
return links; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,59 @@ |
|||||||
|
package gsp.technologies.face.config; |
||||||
|
|
||||||
|
import java.util.HashMap; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
||||||
|
import org.springframework.stereotype.Component; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
@Data |
||||||
|
@Component |
||||||
|
@ConfigurationProperties(prefix = "source") |
||||||
|
public class SourceProperties { |
||||||
|
private Map<String, String> construct; |
||||||
|
private Map<String, String> api; |
||||||
|
private Map<String, String> face; |
||||||
|
|
||||||
|
/** |
||||||
|
* Методы извлечения CONSTRUCT |
||||||
|
*/ |
||||||
|
|
||||||
|
public String protocol() { |
||||||
|
return construct.get("protocol"); |
||||||
|
} |
||||||
|
public String domain() { |
||||||
|
return construct.get("domain"); |
||||||
|
} |
||||||
|
public String port() { |
||||||
|
return construct.get("port"); |
||||||
|
} |
||||||
|
public String prefix(){ |
||||||
|
return protocol() + "://" + domain() + ":" + port(); |
||||||
|
} |
||||||
|
public String hello() { |
||||||
|
return construct.get("hello"); |
||||||
|
} |
||||||
|
public String linkHello(){ |
||||||
|
return prefix() + hello(); |
||||||
|
} |
||||||
|
|
||||||
|
public Map<String, String> links(){ |
||||||
|
Map<String, String> links = new HashMap<>(); |
||||||
|
// перебираем api
|
||||||
|
for (Map.Entry<String, String> entry : api.entrySet()) { |
||||||
|
String link = prefix() + entry.getValue(); |
||||||
|
String key = "source.api." + entry.getKey(); |
||||||
|
links.put(key, link); |
||||||
|
} |
||||||
|
// перебираем face
|
||||||
|
for (Map.Entry<String, String> entry : face.entrySet()) { |
||||||
|
String link = prefix() + entry.getValue(); |
||||||
|
String key = "source.face." + entry.getKey(); |
||||||
|
links.put(key, link); |
||||||
|
} |
||||||
|
return links; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,58 @@ |
|||||||
|
package gsp.technologies.face.config; |
||||||
|
|
||||||
|
import java.util.HashMap; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
||||||
|
import org.springframework.stereotype.Component; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
@Data |
||||||
|
@Component |
||||||
|
@ConfigurationProperties(prefix = "storage") |
||||||
|
public class StorageProperties { |
||||||
|
private Map<String, String> construct; |
||||||
|
private Map<String, String> api; |
||||||
|
private Map<String, String> face; |
||||||
|
|
||||||
|
/** |
||||||
|
* Методы извлечения CONSTRUCT |
||||||
|
*/ |
||||||
|
|
||||||
|
public String protocol() { |
||||||
|
return construct.get("protocol"); |
||||||
|
} |
||||||
|
public String domain() { |
||||||
|
return construct.get("domain"); |
||||||
|
} |
||||||
|
public String port() { |
||||||
|
return construct.get("port"); |
||||||
|
} |
||||||
|
public String prefix(){ |
||||||
|
return protocol() + "://" + domain() + ":" + port(); |
||||||
|
} |
||||||
|
public String hello() { |
||||||
|
return construct.get("hello"); |
||||||
|
} |
||||||
|
public String linkHello(){ |
||||||
|
return prefix() + hello(); |
||||||
|
} |
||||||
|
|
||||||
|
public Map<String, String> links(){ |
||||||
|
Map<String, String> links = new HashMap<>(); |
||||||
|
// перебираем api
|
||||||
|
for (Map.Entry<String, String> entry : api.entrySet()) { |
||||||
|
String link = prefix() + entry.getValue(); |
||||||
|
String key = "storage.api." + entry.getKey(); |
||||||
|
links.put(key, link); |
||||||
|
} |
||||||
|
// перебираем face
|
||||||
|
for (Map.Entry<String, String> entry : face.entrySet()) { |
||||||
|
String link = prefix() + entry.getValue(); |
||||||
|
String key = "storage.face." + entry.getKey(); |
||||||
|
links.put(key, link); |
||||||
|
} |
||||||
|
return links; |
||||||
|
} |
||||||
|
} |
@ -1,7 +0,0 @@ |
|||||||
package gsp.technologies.face.services; |
|
||||||
|
|
||||||
public interface LinksFace { |
|
||||||
|
|
||||||
String storageApiHome(); |
|
||||||
|
|
||||||
} |
|
@ -1,149 +0,0 @@ |
|||||||
package gsp.technologies.face.services; |
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||||
import org.springframework.core.env.Environment; |
|
||||||
import org.springframework.stereotype.Service; |
|
||||||
|
|
||||||
@Service |
|
||||||
public class LinksService{ |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private Environment env; |
|
||||||
|
|
||||||
/** |
|
||||||
* get links from env: storage |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
|
|
||||||
public String storageProtocol(){ |
|
||||||
return env.getProperty("storage.protocol"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageDomain(){ |
|
||||||
return env.getProperty("storage.domain"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storagePort(){ |
|
||||||
return env.getProperty("storage.port"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageHello(){ |
|
||||||
return env.getProperty("storage.hello"); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
public String storageApiHome(){ |
|
||||||
return env.getProperty("storage.api.home"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageApiRoot(){ |
|
||||||
return env.getProperty("storage.api.root"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageApiFiles(){ |
|
||||||
return env.getProperty("storage.api.files"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageApiFileStore(){ |
|
||||||
return env.getProperty("storage.api.file-store"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageApiFileStoreMultiple(){ |
|
||||||
return env.getProperty("storage.api.file-store-multiple"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageApiFileDelete(){ |
|
||||||
return env.getProperty("storage.api.file-delete"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageApiFileDownload(){ |
|
||||||
return env.getProperty("storage.api.file-download"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageApiXlsxPage(){ |
|
||||||
return env.getProperty("storage.api.xlsx-page"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageApiDirectoryCreate(){ |
|
||||||
return env.getProperty("storage.api.directory-create"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageApiDirectoryDelete(){ |
|
||||||
return env.getProperty("storage.api.directory-delete"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageApiFileCreateEmpty(){ |
|
||||||
return env.getProperty("storage.api.file-create-empty"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageApiFileBytes(){ |
|
||||||
return env.getProperty("storage.api.file-bytes"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageFaceHome(){ |
|
||||||
return env.getProperty("storage.face.home"); |
|
||||||
} |
|
||||||
public String storageFaceMainframe(){ |
|
||||||
return env.getProperty("storage.face.mainframe"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageFaceUploadFile(){ |
|
||||||
return env.getProperty("storage.face.upload-file"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageFaceUploadMultipleFiles(){ |
|
||||||
return env.getProperty("storage.face.upload-multiple-files"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageFaceDownloadFile(){ |
|
||||||
return env.getProperty("storage.face.download-file"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageFaceDeleteFile(){ |
|
||||||
return env.getProperty("storage.face.delete-file"); |
|
||||||
} |
|
||||||
|
|
||||||
public String storageFaceViewXlsx(){ |
|
||||||
return env.getProperty("storage.face.view-xlsx"); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* Get links from env: face |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
|
|
||||||
public String faceProtocol(){ |
|
||||||
return env.getProperty("face.protocol"); |
|
||||||
} |
|
||||||
public String faceDomain(){ |
|
||||||
return env.getProperty("face.domain"); |
|
||||||
} |
|
||||||
public String facePort(){ |
|
||||||
return env.getProperty("face.port"); |
|
||||||
} |
|
||||||
public String faceHello(){ |
|
||||||
return env.getProperty("face.hello"); |
|
||||||
} |
|
||||||
public String faceApiHome(){ |
|
||||||
return env.getProperty("face.api.home"); |
|
||||||
} |
|
||||||
public String faceApiUpload(){ |
|
||||||
return env.getProperty("face.api.upload"); |
|
||||||
} |
|
||||||
|
|
||||||
public String faceApiDownload(){ |
|
||||||
return env.getProperty("face.api.download"); |
|
||||||
} |
|
||||||
public String faceFaceMainframe(){ |
|
||||||
return env.getProperty("face.face.mainframe"); |
|
||||||
} |
|
||||||
public String faceFaceStorage(){ |
|
||||||
return env.getProperty("face.face.storage"); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* get links from env: source |
|
||||||
*/ |
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -0,0 +1,39 @@ |
|||||||
|
package gsp.technologies.face.services; |
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.core.env.Environment; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import gsp.technologies.face.config.FaceProperties; |
||||||
|
import gsp.technologies.face.config.SourceProperties; |
||||||
|
import gsp.technologies.face.config.StorageProperties; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
@Service |
||||||
|
public class PropertyService { |
||||||
|
@Autowired |
||||||
|
private FaceProperties face; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private StorageProperties storage; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private SourceProperties source; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private Environment env; |
||||||
|
|
||||||
|
public FaceProperties face(){ |
||||||
|
return face; |
||||||
|
} |
||||||
|
public StorageProperties storage(){ |
||||||
|
return storage; |
||||||
|
} |
||||||
|
public SourceProperties source(){ |
||||||
|
return source; |
||||||
|
} |
||||||
|
public Environment env(){ |
||||||
|
return env; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -1,12 +1,14 @@ |
|||||||
face: |
face: |
||||||
protocol: http:// |
construct: |
||||||
domain: face |
protocol: http |
||||||
port: 8383 |
domain: face |
||||||
hello: /hello |
port: 8383 |
||||||
|
hello: /hello |
||||||
api: |
api: |
||||||
home: /api/v1 |
base: /api/v1 |
||||||
upload: /api/v1/upload |
upload: /upload |
||||||
download: /api/v1/download |
download: /download |
||||||
face: |
face: |
||||||
mainframe: /face/v1/mainframe |
base: /face/v1 |
||||||
storage: /face/v1/storage |
mainframe: /mainframe |
||||||
|
storage: /storage |
@ -1,14 +1,17 @@ |
|||||||
source: |
source: |
||||||
protocol: http:// |
construct: |
||||||
domain: storage |
protocol: http |
||||||
port: 8181 |
domain: source |
||||||
hello: /hello |
port: 8181 |
||||||
|
hello: /hello |
||||||
api: |
api: |
||||||
home: /api/v1 |
base: /api/v1 |
||||||
metadata-list: /api/v1/storage/metadata/list |
metadata-list: /storage/metadata/list |
||||||
post-list: /api/v1/storage/post/list |
post-list: /storage/post/list |
||||||
post-page: /api/v1/storage/post/page |
post-page: /storage/post/page |
||||||
post-page-distinct: /api/v1/storage/post/page/distinct |
post-page-distinct: /storage/post/page/distinct |
||||||
metadata-create: /api/v1/storage/metadata/create |
metadata-create: /storage/metadata/create |
||||||
post-create: /api/v1/storage/post/create |
post-create: /storage/post/create |
||||||
metadata-update: /api/v1/storage/metadata/update |
metadata-update: /storage/metadata/update |
||||||
|
face: |
||||||
|
base: /face/v1 |
@ -1,44 +1,45 @@ |
|||||||
storage: |
storage: |
||||||
protocol: http:// |
construct: |
||||||
domain: storage |
protocol: http |
||||||
port: 8282 |
domain: storage |
||||||
# страница описания сервиса |
port: 8282 |
||||||
hello: /hello |
# страница описания сервиса |
||||||
|
hello: /hello |
||||||
api: |
api: |
||||||
################################### |
################################### |
||||||
# основные возможности api |
# основные возможности api |
||||||
# корневая директория сервиса "storage" |
# корневая директория сервиса "storage" |
||||||
home: /api/v1 |
base: /api/v1 |
||||||
# перечень файлов, размещенных в хранилище |
# перечень файлов, размещенных в хранилище |
||||||
files: /api/v1/files |
files: /files |
||||||
# получение пути к корню файлового хранилища |
# получение пути к корню файлового хранилища |
||||||
root: /api/v1/root |
root: /root |
||||||
# сохранение файла в хранилище |
# сохранение файла в хранилище |
||||||
file-store: /api/v1/files/store |
file-store: /files/store |
||||||
# сохранение нескольких файлов в хранилище |
# сохранение нескольких файлов в хранилище |
||||||
file-store-multiple: /api/v1/files/store-multiple |
file-store-multiple: /files/store-multiple |
||||||
# удаление файла из хранилища |
# удаление файла из хранилища |
||||||
file-delete: /api/v1/files/delete |
file-delete: /files/delete |
||||||
# скачивание файла из хранилища |
# скачивание файла из хранилища |
||||||
file-download: /api/v1/files/download |
file-download: /files/download |
||||||
# постраничное извлечение данных xlsx-файла в json формате |
# постраничное извлечение данных xlsx-файла в json формате |
||||||
xlsx-page: /api/v1/files/xlsx |
xlsx-page: /files/xlsx |
||||||
|
|
||||||
################################### |
################################### |
||||||
# дополнительные возможности api |
# дополнительные возможности api |
||||||
# создание пустого файла |
# создание пустого файла |
||||||
file-create-empty: /api/v1/files/create |
file-create-empty: /files/create |
||||||
# создание диектории |
# создание диектории |
||||||
directory-create: /api/v1/dirs/create |
directory-create: /dirs/create |
||||||
# удаление директории |
# удаление директории |
||||||
directory-delete: /api/v1/dirs/delete |
directory-delete: /dirs/delete |
||||||
# получение массива байтов файла, без буферизации |
# получение массива байтов файла, без буферизации |
||||||
file-bytes: /files/get-bytes |
file-bytes: /files/get-bytes |
||||||
face: |
face: |
||||||
home: /face/v1 |
base: /face/v1 |
||||||
mainframe: /face/v1/mainframe |
mainframe: /mainframe |
||||||
upload-file: /face/v1/upload-file |
upload-file: /upload-file |
||||||
upload-multiple-files: /face/v1/upload-multiple-files |
upload-multiple-files: /upload-multiple-files |
||||||
download: /files/download-file |
download: /files/download-file |
||||||
delete: /files/delete-file |
delete: /files/delete-file |
||||||
view-xlsx: /files/view |
view-xlsx: /files/view |
Loading…
Reference in new issue