WebService tool class (called by SpringBoot environment)

The following tools integrate multiple ways to call webservice, such as http method, axis method, dynamic client generation method, etc. They are refined for bloggers’ actual work and are convenient for everyone to apply directly. Common methods are listed with calling examples. 1. The entire tool code package com.gykjit.spd.edi.util; import org.apache.cxf.endpoint.Client; import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; import org.apache.cxf.transport.http.HTTPConduit; […]

Practical installation of oracle19c server on centos7.9 (nanny-level steps)

1. Preparation before installation 1.1. Installation environment preparation I use centos7.9 + X86 environment Memory 4G Storage 50G 1.2. Installation package preparation You can download it directly from the official website Installation package: https://www.oracle.com/database/technologies/oracle-database-software-downloads.html#db_free Pre-installation package: https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/index.html You can also download it through the Baidu network disk I shared. Link: https://pan.baidu.com/s/1kRg1pOLzTThdbAmWhaxEZA Extraction code: tgi6 There […]

[Comprehensive explanation of Linux commands] 116.umount command: a practical tool for unloading a loaded file system

Article directory umount Additional information grammar Options parameter Example Learn `python` from scratch umount Used to unmount a mounted file system Supplementary instructions The umount command is used to unmount a mounted file system. You can umount the file system using the device name or mount point, but it is best to unmount it through […]

[Comprehensive explanation of Linux commands] 121. Practical tips for using the dd command to copy and convert files

Article directory dd Additional information grammar Options Example Generate random string Learn `python` from scratch dd The dd command is used to copy files and convert and format the contents of the original files. Supplementary instructions The dd command is used to copy files and convert and format the contents of the original files. The […]

Panorama of NLP machine translation: full analysis from basic principles to technical practice

Directory 1. Introduction to machine translation 1. What is machine translation (MT)? 2. Source language and target language 3. Translation model 4. The importance of context 2. Rule-based machine translation (RBMT) 1. Formulation of rules 2. Dictionary and vocabulary selection 3. Limitations and Challenges 4. PyTorch implementation 3. Statistical Machine Translation (SMT) 1. Data-driven 2. […]

Hibernate + Springboot implements the @Filter filter to automatically add conditional filtering. How to implement sprinboot multi-tenancy (shared table, by adding tenant_id)

Hibernate + Springboot implements @Filter filter to automatically add conditional filtering After three days and three nights of torture, I finally solved this requirement. First of all, this requirement is generally implemented through annotations. So the first step is to write an annotation by hand: @Target({<!– –>ElementType.PARAMETER, ElementType.METHOD})//The target location for annotation placement, METHOD can […]

SpringBoot-Call external interface (three ways)

Method 1: Use original httpClient request @RequestMapping(“/submit/{documentId}”) public String submit1(@PathVariable String documentId) throws ParseException {<!– –> //Convert the data to be sent into a json format string Map<String,Object> map = task2Service.getMap(documentId); String jsonStr = JSON.toJSONString(map,SerializerFeature.WRITE_MAP_NULL_FEATURES,SerializerFeature.QuoteFieldNames); JSONObject jsonObject = JSON.parseObject(jsonStr); JSONObject sr = task2Service.doPost(jsonObject); return sr.toString(); } Use native httpClient to call external interface public static […]

Asynchronously calling RESTful interface based on okhttp3 and CompletableFuture

Application scenarios When the server program provides a set of RESTful interfaces for third-party calls, it often needs to provide the other party with an SDK. At this time, if you simply use the okhttp3 client to encapsulate the calls, when the request volume is large, request blocking will often occur and the JVM memory […]

Practical implementation of the function of adding text watermarks and picture watermarks in Java!

This article introduces how to add text watermarks to pictures in Java. The watermark can be a picture or text, and it is easy to operate. Steps to implement adding watermark to pictures in java: Get the original image object information (local image or network image) Add watermark (set watermark color, font, coordinates, etc.) Process […]