{"id":53301,"date":"2025-08-12T08:04:26","date_gmt":"2025-08-12T00:04:26","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/53301.html"},"modified":"2025-08-12T08:04:26","modified_gmt":"2025-08-12T00:04:26","slug":"%e3%80%8a%e9%bb%91%e9%a9%ac%e5%a4%b4%e6%9d%a1%e3%80%8bday04-%e8%b8%a9%e5%9d%91%e4%bb%a5%e5%8f%8a%e4%b9%a0%e5%90%8e%e5%88%86%e4%ba%ab","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/53301.html","title":{"rendered":"\u300a\u9ed1\u9a6c\u5934\u6761\u300bday04 \u8e29\u5751\u4ee5\u53ca\u4e60\u540e\u5206\u4eab"},"content":{"rendered":"<p>\u4eca\u65e5\u4e3b\u8981\u5c31\u662f\u4e00\u4e2a\u963f\u91cc\u4e91sdk v2\u7684\u5347\u7ea7,\u522b\u7684\u4e5f\u6ca1\u6709\u4ec0\u4e48,\u672c\u6587\u4ee3\u7801\u5747\u4e3a\u53c2\u7167\u5b98\u7f51\u6587\u6863\u4ee5\u53ca\u5c3d\u53ef\u80fd\u7684\u8d34\u8fd1\u539f\u9879\u76ee\u4ee3\u7801sdk v1\u5199\u6cd5,\u54e6\u5bf9\u4e86,\u589e\u5f3a\u7248\u4e0d\u7528\u4f01\u4e1a\u8ba4\u8bc1,\u4e2a\u4eba\u6ce8\u518c\u6309\u91cf\u4ed8\u8d39,\u5e94\u8be5\u4e0d\u8d35,\u7528\u6765\u6d4b\u8bd5\u5f88\u597d<\/p>\n<p>\u5b98\u7f51\u5949\u4e0a,\u56fe\u7247\u81ea\u52a8\u5ba1\u6838\u4e5f\u5728\u91cc\u9762<\/p>\n<p>\u5982\u4f55\u4f7f\u7528\u6587\u672c\u5ba1\u6838\u589e\u5f3a\u7248\u8bc6\u522b\u6587\u672c\u8fdd\u89c4\u98ce\u9669_\u5185\u5bb9\u5b89\u5168(Content Moderation)-\u963f\u91cc\u4e91\u5e2e\u52a9\u4e2d\u5fc3<\/p>\n<h2>\u963f\u91cc\u4e91\u5185\u5bb9\u5b89\u5168\u670d\u52a1sdk v2<\/h2>\n<h3>nacos\u4e2d\u7684\u76f8\u5173\u914d\u7f6e<\/h3>\n<p>\u6211\u672c\u4ee5\u4e3a,\u6709\u4e86minio,\u5c31\u4e0d\u7528oss\u4e86,\u7ed3\u679c\u8fd8\u662f\u7528\u4e86<\/p>\n<p>aliyun:<br \/>\n  text:<br \/>\n    accessKeyId: YouraccessKeyId<br \/>\n    secret: Yoursecret<br \/>\n    service: comment_detection<br \/>\n    region: cn-shanghai<br \/>\n    endpoint: green-cip.cn-shanghai.aliyuncs.com<br \/>\n  image:<br \/>\n    accessKeyId: YouraccessKeyId<br \/>\n    secret: YouraccessKeyId<br \/>\n    scenes: terrorism<br \/>\n    #aliyun.scenes&#061;porn,terrorism,ad,qrcode,live,logo<br \/>\n    service: baselineCheck<br \/>\n    region:  &#034;cn-shanghai&#034;<br \/>\n    endpoint: green-cip.cn-shanghai.aliyuncs.com<br \/>\n    ossEndpoint: oss-cn-beijing.aliyuncs.com<br \/>\n    ossBucket: YourBucketName <\/p>\n<p>\u4e3a\u4ec0\u4e48\u8981\u533a\u5206text\u4ee5\u53caimage,\u56e0\u4e3a\u914d\u7f6eprefix\u5168\u90e8\u7b49\u4e8ealiyun\u4f1a\u7206\u524d\u7f00\u91cd\u590d\u7684\u9519,\u6240\u4ee5\u6211\u52a0\u4e86\u4e00\u70b9<\/p>\n<p>\u5173\u4e8e\u4e24\u8fb9\u7684service\u53c2\u6570,\u6211\u611f\u89c9\u4ee5\u540e\u6709\u7528,\u6240\u4ee5\u6211\u622a\u56fe\u4e86<\/p>\n<p>\u6587\u672c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"541\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250812000424-689a85086b5b8.png\" width=\"1317\" \/><\/p>\n<p>\u56fe\u7247:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"664\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250812000424-689a8508bff04.png\" width=\"1301\" \/><\/p>\n<p>\u5c31\u662f\u6839\u636e\u4e0d\u540c\u7684\u573a\u666f\u53bb\u8c03\u6574\u53c2\u6570\u5c31\u884c<\/p>\n<h3>\u4f9d\u8d56\u5f15\u5165<\/h3>\n<p>        &lt;!&#8211;\u589e\u5f3a\u7248\u963f\u91cc\u4e91\u5185\u5bb9\u5b89\u5168&#8211;&gt;<br \/>\n        &lt;dependency&gt;<br \/>\n            &lt;groupId&gt;com.aliyun&lt;\/groupId&gt;<br \/>\n            &lt;artifactId&gt;green20220302&lt;\/artifactId&gt;<br \/>\n            &lt;version&gt;2.20.0&lt;\/version&gt;<br \/>\n        &lt;\/dependency&gt;<br \/>\n        &lt;dependency&gt;<br \/>\n            &lt;groupId&gt;com.aliyun.oss&lt;\/groupId&gt;<br \/>\n            &lt;artifactId&gt;aliyun-sdk-oss&lt;\/artifactId&gt;<br \/>\n            &lt;version&gt;3.17.4&lt;\/version&gt; <\/p>\n<p>\u4f9d\u8d56\u4e00\u4e2a\u662f\u589e\u5f3a\u7248\u5185\u5bb9\u5b89\u5168\u7684,\u4e00\u4e2a\u662foss\u7684,\u6ce8\u610foss\u7684\u7248\u672c,\u5982\u679c\u7248\u672c\u4f4e\u4e00\u70b9\u53ef\u80fd\u4f1a\u5bfc\u81f4\u540e\u9762\u4e1a\u52a1\u4ee3\u7801\u4e2dOSSClientBuilder\u7206\u9519<\/p>\n<h3>\u4e1a\u52a1\u4ee3\u7801<\/h3>\n<p>\u628a\u8fd9\u4e24\u4e2a\u4e1a\u52a1\u4ee3\u7801\u7ed9\u539f\u6765\u4ee3\u7801\u91cc\u7684\u4e24\u4e2a\u66ff\u6362\u6389\u5373\u53ef,\u8bb0\u5f97\u6539\u4e00\u4e0bspring.facotories<\/p>\n<h4>\u6587\u672c\u81ea\u52a8\u5ba1\u6838<\/h4>\n<p>\u5b9e\u9645\u5e72\u6d3b\u7684\u65b9\u6cd5\u662fmoderate,\u4f20String content\u5373\u53ef<\/p>\n<p>package com.heima.common.aliyun;<\/p>\n<p>import com.alibaba.fastjson.JSON;<br \/>\nimport com.alibaba.fastjson.JSONObject;<br \/>\nimport com.aliyun.green20220302.Client;<br \/>\nimport com.aliyun.green20220302.models.TextModerationRequest;<br \/>\nimport com.aliyun.green20220302.models.TextModerationResponse;<br \/>\nimport com.aliyun.green20220302.models.TextModerationResponseBody;<br \/>\nimport com.aliyun.teaopenapi.models.Config;<br \/>\nimport com.aliyun.teautil.models.RuntimeOptions;<br \/>\nimport lombok.Getter;<br \/>\nimport lombok.Setter;<br \/>\nimport lombok.extern.slf4j.Slf4j;<br \/>\nimport org.springframework.boot.context.properties.ConfigurationProperties;<br \/>\nimport org.springframework.stereotype.Component;<\/p>\n<p>import javax.annotation.PostConstruct;<br \/>\nimport java.util.HashMap;<br \/>\nimport java.util.Map;<br \/>\nimport java.util.UUID;<\/p>\n<p>&#064;Getter<br \/>\n&#064;Setter<br \/>\n&#064;Slf4j<br \/>\n&#064;Component<br \/>\n&#064;ConfigurationProperties(prefix &#061; &#034;aliyun.text&#034;)<br \/>\npublic class GreenTextModeration {<\/p>\n<p>    \/** \u4ece\u914d\u7f6e\u6587\u4ef6\u8bfb\u53d6 *\/<br \/>\n    private String accessKeyId;<br \/>\n    private String secret;<br \/>\n    private String region;<br \/>\n    private String endpoint;<br \/>\n    private String service;<\/p>\n<p>    private Client client;<\/p>\n<p>    public void initClient() throws Exception {<br \/>\n        Config config &#061; new Config();<br \/>\n        config.setAccessKeyId(accessKeyId);<br \/>\n        config.setAccessKeySecret(secret);<br \/>\n        config.setRegionId(region);<br \/>\n        config.setEndpoint(endpoint);<br \/>\n        config.setConnectTimeout(3000);<br \/>\n        config.setReadTimeout(6000);<\/p>\n<p>        client &#061; new Client(config);<br \/>\n        log.info(&#034;Aliyun Green client initialized, endpoint&#061;{}, region&#061;{}&#034;, endpoint, region);<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * \u5ba1\u6838\u6587\u672c<br \/>\n     * &#064;param content \u5f85\u68c0\u6d4b\u6587\u672c<br \/>\n     * &#064;return suggestion: pass\/review\/block; label: \u547d\u4e2d\u7c7b\u578b<br \/>\n     *\/<br \/>\n    public Map&lt;String, String&gt; moderate(String content) throws Exception {<br \/>\n        initClient();<br \/>\n        Map&lt;String, String&gt; resultMap &#061; new HashMap&lt;&gt;();<br \/>\n        if (content &#061;&#061; null || content.trim().isEmpty()) {<br \/>\n            resultMap.put(&#034;suggestion&#034;, &#034;pass&#034;);<br \/>\n            return resultMap;<br \/>\n        }<\/p>\n<p>        try {<br \/>\n            JSONObject serviceParameters &#061; new JSONObject();<br \/>\n            serviceParameters.put(&#034;content&#034;, content);<br \/>\n            serviceParameters.put(&#034;dataId&#034;, UUID.randomUUID().toString());<\/p>\n<p>            TextModerationRequest req &#061; new TextModerationRequest();<br \/>\n            req.setService(service);<br \/>\n            req.setServiceParameters(serviceParameters.toJSONString());<\/p>\n<p>            RuntimeOptions runtime &#061; new RuntimeOptions();<br \/>\n            runtime.readTimeout &#061; 10000;<br \/>\n            runtime.connectTimeout &#061; 10000;<\/p>\n<p>            TextModerationResponse response &#061; client.textModerationWithOptions(req, runtime);<br \/>\n            if (response &#061;&#061; null || response.getStatusCode() !&#061; 200) {<br \/>\n                log.warn(&#034;textModeration failed or status !&#061; 200&#034;);<br \/>\n                return null;<br \/>\n            }<\/p>\n<p>            TextModerationResponseBody body &#061; response.getBody();<br \/>\n            log.warn(&#034;Full response body: {}&#034;, JSON.toJSONString(body, true));<br \/>\n            if (body !&#061; null &amp;&amp; body.getCode() !&#061; null &amp;&amp; body.getCode() &#061;&#061; 200) {<br \/>\n                TextModerationResponseBody.TextModerationResponseBodyData data &#061; body.getData();<br \/>\n                String labels &#061; data.getLabels();<\/p>\n<p>                if (labels !&#061; null &amp;&amp; !labels.trim().isEmpty() &amp;&amp; !&#034;[]&#034;.equals(labels.trim())) {<br \/>\n                    resultMap.put(&#034;suggestion&#034;, &#034;block&#034;);<br \/>\n                    resultMap.put(&#034;label&#034;, labels);<br \/>\n                } else {<br \/>\n                    resultMap.put(&#034;suggestion&#034;, &#034;pass&#034;);<br \/>\n                }<br \/>\n                return resultMap;<br \/>\n            } else {<br \/>\n                log.warn(&#034;textModeration code !&#061; 200&#034;);<br \/>\n                return null;<br \/>\n            }<br \/>\n        } catch (Exception e) {<br \/>\n            log.error(&#034;text moderation error&#034;, e);<br \/>\n            return null;<br \/>\n        }<br \/>\n    }<br \/>\n}<\/p>\n<h4>\u56fe\u7247\u81ea\u52a8\u5ba1\u6838<\/h4>\n<p>package com.heima.common.aliyun;<\/p>\n<p>import com.alibaba.fastjson.JSON;<br \/>\nimport com.alibaba.fastjson.JSONObject;<br \/>\nimport com.aliyun.green20220302.Client;<br \/>\nimport com.aliyun.green20220302.models.ImageModerationRequest;<br \/>\nimport com.aliyun.green20220302.models.ImageModerationResponse;<br \/>\nimport com.aliyun.green20220302.models.ImageModerationResponseBody;<br \/>\nimport com.aliyun.oss.OSS;<br \/>\nimport com.aliyun.oss.OSSClientBuilder;<br \/>\nimport com.aliyun.teaopenapi.models.Config;<br \/>\nimport com.aliyun.teautil.models.RuntimeOptions;<br \/>\nimport lombok.Getter;<br \/>\nimport lombok.Setter;<br \/>\nimport lombok.extern.slf4j.Slf4j;<br \/>\nimport org.springframework.boot.context.properties.ConfigurationProperties;<br \/>\nimport org.springframework.stereotype.Component;<\/p>\n<p>import javax.annotation.PostConstruct;<br \/>\nimport java.io.ByteArrayInputStream;<br \/>\nimport java.util.*;<\/p>\n<p>&#064;Slf4j<br \/>\n&#064;Getter<br \/>\n&#064;Setter<br \/>\n&#064;Component<br \/>\n&#064;ConfigurationProperties(prefix &#061; &#034;aliyun.image&#034;)<br \/>\npublic class GreenImageModeration {<\/p>\n<p>    \/\/ \u7eff\u7f51\u914d\u7f6e<br \/>\n    private String accessKeyId;<br \/>\n    private String secret;<br \/>\n    private String region;<br \/>\n    private String endpoint;<br \/>\n    private String service;<br \/>\n    private String scenes;<\/p>\n<p>    private Client client;<\/p>\n<p>    \/\/ \u963f\u91cc\u4e91OSS\u914d\u7f6e<br \/>\n    private String ossEndpoint;<br \/>\n    private String ossBucket;<br \/>\n    private OSS ossClient;<\/p>\n<p>    public void initClient() throws Exception {<br \/>\n        \/\/ \u521d\u59cb\u5316\u7eff\u7f51Client<br \/>\n        Config config &#061; new Config();<br \/>\n        config.setAccessKeyId(accessKeyId);<br \/>\n        config.setAccessKeySecret(secret);<br \/>\n        config.setRegionId(region);<br \/>\n        config.setEndpoint(endpoint);<br \/>\n        client &#061; new Client(config);<\/p>\n<p>        \/\/ \u521d\u59cb\u5316OSS\u5ba2\u6237\u7aef<br \/>\n        ossClient &#061; new OSSClientBuilder().build(ossEndpoint, accessKeyId,secret);<br \/>\n        log.info(&#034;Initialized clients: GreenImageModeration service&#061;{} region&#061;{}, OSS endpoint&#061;{}&#034;, service, region, ossEndpoint);<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * \u4e0a\u4f20\u56fe\u7247\u4e8c\u8fdb\u5236\u5230OSS&#xff0c;\u8fd4\u56de\u56fe\u7247\u516c\u7f51\u8bbf\u95eeURL<br \/>\n     *\/<br \/>\n    public String uploadImageToOss(byte[] imageBytes, String objectName) {<br \/>\n        try {<br \/>\n            ByteArrayInputStream inputStream &#061; new ByteArrayInputStream(imageBytes);<br \/>\n            ossClient.putObject(ossBucket, objectName, inputStream);<br \/>\n            \/\/ \u62fc\u63a5\u516c\u7f51URL&#xff0c;\u5047\u8bbeBucket\u5f00\u542f\u4e86\u516c\u7f51\u8bfb\u6743\u9650<br \/>\n            String url &#061; &#034;https:\/\/&#034; &#043; ossBucket &#043; &#034;.&#034; &#043; ossEndpoint &#043; &#034;\/&#034; &#043; objectName;<br \/>\n            return url;<br \/>\n        } catch (Exception e) {<br \/>\n            log.error(&#034;Upload image to OSS failed&#034;, e);<br \/>\n            return null;<br \/>\n        }<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * \u56fe\u7247\u5ba1\u6838&#xff08;\u4f7f\u7528URL\u65b9\u5f0f&#xff09;<br \/>\n     * \u5148\u4e0a\u4f20\u56fe\u7247\u5230OSS&#xff0c;\u518d\u7528\u56fe\u7247URL\u8c03\u7528\u7eff\u7f51\u63a5\u53e3<br \/>\n     * &#064;param imageList \u56fe\u7247\u5b57\u8282\u6570\u7ec4\u5217\u8868<br \/>\n     * &#064;return \u5ba1\u6838\u7ed3\u679c Map<br \/>\n     *\/<br \/>\n    public Map&lt;String, String&gt; moderateImage(List&lt;byte[]&gt; imageList) throws Exception {<br \/>\n        initClient();<br \/>\n        Map&lt;String, String&gt; resultMap &#061; new HashMap&lt;&gt;();<br \/>\n        for (int i &#061; 0; i &lt; imageList.size(); i&#043;&#043;) {<br \/>\n            byte[] imageBytes &#061; imageList.get(i);<br \/>\n            String objectName &#061; &#034;image-moderation\/&#034; &#043; UUID.randomUUID().toString() &#043; &#034;.jpg&#034;; \/\/ \u81ea\u5b9a\u4e49\u8def\u5f84\u53ca\u540d\u79f0<\/p>\n<p>            \/\/ 1. \u4e0a\u4f20\u56fe\u7247\u5230OSS&#xff0c;\u83b7\u53d6URL<br \/>\n            String imageUrl &#061; uploadImageToOss(imageBytes, objectName);<br \/>\n            if (imageUrl &#061;&#061; null) {<br \/>\n                log.error(&#034;Upload image to OSS failed for image index {}&#034;, i);<br \/>\n                resultMap.put(&#034;suggestion&#034;, &#034;upload_failed&#034;);<br \/>\n                continue;<br \/>\n            }<\/p>\n<p>            \/\/ 2. \u6784\u9020\u7eff\u7f51\u5ba1\u6838\u8bf7\u6c42\u53c2\u6570&#xff0c;\u4f7f\u7528URL\u65b9\u5f0f<br \/>\n            JSONObject params &#061; new JSONObject();<br \/>\n            params.put(&#034;dataId&#034;, UUID.randomUUID().toString());<br \/>\n            params.put(&#034;imageUrl&#034;, imageUrl); \/\/ \u8fd9\u91cc\u6539\u7528URL\u4f20\u53c2<br \/>\n            params.put(&#034;scenes&#034;, Arrays.asList(scenes.split(&#034;,&#034;)));<\/p>\n<p>            ImageModerationRequest req &#061; new ImageModerationRequest();<br \/>\n            req.setService(service);<br \/>\n            req.setServiceParameters(params.toJSONString());<\/p>\n<p>            RuntimeOptions runtime &#061; new RuntimeOptions();<br \/>\n            runtime.connectTimeout &#061; 10000;<br \/>\n            runtime.readTimeout &#061; 10000;<\/p>\n<p>            ImageModerationResponse resp &#061; client.imageModerationWithOptions(req, runtime);<br \/>\n            if (resp &#061;&#061; null || resp.getStatusCode() !&#061; 200) {<br \/>\n                log.error(&#034;ImageModeration HTTP error, status: {}&#034;, resp &#061;&#061; null ? &#034;null&#034; : resp.getStatusCode());<br \/>\n                resultMap.put(&#034;suggestion&#034;, &#034;http_error&#034;);<br \/>\n                continue;<br \/>\n            }<\/p>\n<p>            ImageModerationResponseBody body &#061; resp.getBody();<br \/>\n            log.warn(&#034;Full response body: {}&#034;, JSON.toJSONString(body, true));<\/p>\n<p>            if (body.getCode() !&#061; null &amp;&amp; body.getCode() &#061;&#061; 200) {<br \/>\n                ImageModerationResponseBody.ImageModerationResponseBodyData data &#061; body.getData();<br \/>\n                if (data &#061;&#061; null || data.getResult() &#061;&#061; null || data.getResult().isEmpty()) {<br \/>\n                    log.warn(&#034;No moderation results returned&#034;);<br \/>\n                    resultMap.put(&#034;suggestion&#034;, &#034;pass&#034;);<br \/>\n                    continue;<br \/>\n                }<\/p>\n<p>                ImageModerationResponseBody.ImageModerationResponseBodyDataResult first &#061; data.getResult().get(0);<br \/>\n                String label &#061; first.getLabel();<br \/>\n                Float confidence &#061; first.getConfidence();<\/p>\n<p>                String suggestion;<br \/>\n                if (&#034;nonLabel&#034;.equals(label) || label &#061;&#061; null || label.isEmpty()) {<br \/>\n                    suggestion &#061; &#034;pass&#034;;<br \/>\n                } else {<br \/>\n                    suggestion &#061; &#034;block&#034;;<br \/>\n                }<br \/>\n                resultMap.put(&#034;suggestion&#034;, suggestion);<br \/>\n                resultMap.put(&#034;label&#034;, label !&#061; null ? label : &#034;&#034;);<br \/>\n                resultMap.put(&#034;confidence&#034;, confidence !&#061; null ? confidence.toString() : &#034;&#034;);<\/p>\n<p>                log.warn(&#034;Moderation result: suggestion&#061;{}, label&#061;{}, confidence&#061;{}&#034;, suggestion, label, confidence);<br \/>\n            } else {<br \/>\n                log.error(&#034;Moderation failed: code&#061;{}, msg&#061;{}&#034;, body.getCode(), body.getMsg());<br \/>\n                resultMap.put(&#034;suggestion&#034;, &#034;fail&#034;);<br \/>\n            }<br \/>\n        }<br \/>\n        return resultMap;<br \/>\n    }<\/p>\n<p>    \/\/ \u5173\u95edOSS\u5ba2\u6237\u7aef\u65f6\u673a\u8bf7\u6839\u636e\u9879\u76ee\u9700\u6c42\u8c03\u6574<br \/>\n    public void shutdown() {<br \/>\n        if (ossClient !&#061; null) {<br \/>\n            ossClient.shutdown();<br \/>\n        }<br \/>\n    }<br \/>\n}<\/p>\n<p>\u89e3\u91ca\u4e00\u4e0b\u4e3a\u4ec0\u4e48\u7528oss:\u56e0\u4e3aminio\u7684\u56fe\u7247\u8bbf\u95ee\u8def\u5f84\u4e0d\u662f\u516c\u7f51\u8def\u5f84,\u800c\u963f\u91cc\u4e91\u5185\u5bb9\u5b89\u5168\u670d\u52a1\u4f20\u7684\u56fe\u7247url\u4ed6\u53c8\u8981\u6c42\u662f\u516c\u7f51url,\u6240\u4ee5\u4e1a\u52a1\u903b\u8f91\u5b9e\u9645\u4e0a\u662f\u5148\u4eceminio\u4e2d\u4e0b\u8f7d\u5bf9\u5e94\u7684\u56fe\u7247\u7136\u540e\u4e0a\u4f20\u5230oss\u91cc(\u6211\u628a\u4e4b\u524d\u505atlias\u7684Bucket\u62ff\u6765\u7528\u4e86)<\/p>\n<p>\u8fd9\u4e2a\u91cc\u9762\u5e72\u6d3b\u7684\u65b9\u6cd5\u662fmoderateImage,\u4f20List&lt;byte[]&gt; imageList<\/p>\n<\/p>\n<p>\u4e24\u4e2a\u4e1a\u52a1\u5b9e\u73b0\u903b\u8f91\u5c31\u8ddf\u539f\u6765\u7684\u57fa\u672c\u4e00\u6a21\u4e00\u6837\u4e86,\u4ee5\u4e0a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb226\u6b21\uff0c\u70b9\u8d5e2\u6b21\uff0c\u6536\u85cf2\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u963f\u91cc\u4e91\u5185\u5bb9\u5b89\u5168SDK V2\u7684\u5347\u7ea7\u8fc7\u7a0b\uff0c\u4e3b\u8981\u5305\u62ec\u6587\u672c\u548c\u56fe\u7247\u5ba1\u6838\u529f\u80fd\u7684\u5b9e\u73b0\u3002\u6587\u672c\u5ba1\u6838\u901a\u8fc7GreenTextModeration\u7c7b\u5b9e\u73b0\uff0c\u56fe\u7247\u5ba1\u6838\u901a\u8fc7GreenImageModeration\u7c7b\u5904\u7406\uff0c\u540e\u8005\u9700\u8981\u5148\u5c06\u56fe\u7247\u4e0a\u4f20\u81f3OSS\u83b7\u53d6\u516c\u7f51URL\u3002\u914d\u7f6e\u4e0a\u533a\u5206\u4e86\u6587\u672c\u548c\u56fe\u7247\u670d\u52a1\u7684\u4e0d\u540c\u53c2\u6570\uff0c\u5e76\u63d0\u4f9b\u4e86\u76f8\u5e94\u7684\u4ee3\u7801\u5b9e\u73b0\u3002\u5347\u7ea7\u8fc7\u7a0b\u4e2d\u89e3\u51b3\u4e86MinIO\u56fe\u7247\u975e\u516c\u7f51\u8bbf\u95ee\u7684\u95ee\u9898\uff0c\u6539\u7528OSS\u5b58\u50a8\u56fe\u7247\u3002\u4e24\u4e2a\u6838\u5fc3\u65b9\u6cd5moderate\u548cmoderateImage\u5206\u522b\u5904\u7406\u6587\u672c\u548c\u56fe\u7247\u5185\u5bb9\u5ba1\u6838\uff0c\u8fd4\u56de\u5305\u542b\u5ba1\u6838\u7ed3\u679c\u7684\u4fe1\u606f\u3002<\/p>\n","protected":false},"author":2,"featured_media":53299,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[386,99,98,963,100,96],"topic":[],"class_list":["post-53301","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-intellij-idea","tag-java","tag-spring-boot","tag-spring-cloud","tag-100","tag-96"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u300a\u9ed1\u9a6c\u5934\u6761\u300bday04 \u8e29\u5751\u4ee5\u53ca\u4e60\u540e\u5206\u4eab - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/53301.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u300a\u9ed1\u9a6c\u5934\u6761\u300bday04 \u8e29\u5751\u4ee5\u53ca\u4e60\u540e\u5206\u4eab - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb226\u6b21\uff0c\u70b9\u8d5e2\u6b21\uff0c\u6536\u85cf2\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u963f\u91cc\u4e91\u5185\u5bb9\u5b89\u5168SDK V2\u7684\u5347\u7ea7\u8fc7\u7a0b\uff0c\u4e3b\u8981\u5305\u62ec\u6587\u672c\u548c\u56fe\u7247\u5ba1\u6838\u529f\u80fd\u7684\u5b9e\u73b0\u3002\u6587\u672c\u5ba1\u6838\u901a\u8fc7GreenTextModeration\u7c7b\u5b9e\u73b0\uff0c\u56fe\u7247\u5ba1\u6838\u901a\u8fc7GreenImageModeration\u7c7b\u5904\u7406\uff0c\u540e\u8005\u9700\u8981\u5148\u5c06\u56fe\u7247\u4e0a\u4f20\u81f3OSS\u83b7\u53d6\u516c\u7f51URL\u3002\u914d\u7f6e\u4e0a\u533a\u5206\u4e86\u6587\u672c\u548c\u56fe\u7247\u670d\u52a1\u7684\u4e0d\u540c\u53c2\u6570\uff0c\u5e76\u63d0\u4f9b\u4e86\u76f8\u5e94\u7684\u4ee3\u7801\u5b9e\u73b0\u3002\u5347\u7ea7\u8fc7\u7a0b\u4e2d\u89e3\u51b3\u4e86MinIO\u56fe\u7247\u975e\u516c\u7f51\u8bbf\u95ee\u7684\u95ee\u9898\uff0c\u6539\u7528OSS\u5b58\u50a8\u56fe\u7247\u3002\u4e24\u4e2a\u6838\u5fc3\u65b9\u6cd5moderate\u548cmoderateImage\u5206\u522b\u5904\u7406\u6587\u672c\u548c\u56fe\u7247\u5185\u5bb9\u5ba1\u6838\uff0c\u8fd4\u56de\u5305\u542b\u5ba1\u6838\u7ed3\u679c\u7684\u4fe1\u606f\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/53301.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-12T00:04:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250812000424-689a85086b5b8.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/53301.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/53301.html\",\"name\":\"\u300a\u9ed1\u9a6c\u5934\u6761\u300bday04 \u8e29\u5751\u4ee5\u53ca\u4e60\u540e\u5206\u4eab - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-12T00:04:26+00:00\",\"dateModified\":\"2025-08-12T00:04:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/53301.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/53301.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/53301.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u300a\u9ed1\u9a6c\u5934\u6761\u300bday04 \u8e29\u5751\u4ee5\u53ca\u4e60\u540e\u5206\u4eab\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u300a\u9ed1\u9a6c\u5934\u6761\u300bday04 \u8e29\u5751\u4ee5\u53ca\u4e60\u540e\u5206\u4eab - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/53301.html","og_locale":"zh_CN","og_type":"article","og_title":"\u300a\u9ed1\u9a6c\u5934\u6761\u300bday04 \u8e29\u5751\u4ee5\u53ca\u4e60\u540e\u5206\u4eab - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb226\u6b21\uff0c\u70b9\u8d5e2\u6b21\uff0c\u6536\u85cf2\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u963f\u91cc\u4e91\u5185\u5bb9\u5b89\u5168SDK V2\u7684\u5347\u7ea7\u8fc7\u7a0b\uff0c\u4e3b\u8981\u5305\u62ec\u6587\u672c\u548c\u56fe\u7247\u5ba1\u6838\u529f\u80fd\u7684\u5b9e\u73b0\u3002\u6587\u672c\u5ba1\u6838\u901a\u8fc7GreenTextModeration\u7c7b\u5b9e\u73b0\uff0c\u56fe\u7247\u5ba1\u6838\u901a\u8fc7GreenImageModeration\u7c7b\u5904\u7406\uff0c\u540e\u8005\u9700\u8981\u5148\u5c06\u56fe\u7247\u4e0a\u4f20\u81f3OSS\u83b7\u53d6\u516c\u7f51URL\u3002\u914d\u7f6e\u4e0a\u533a\u5206\u4e86\u6587\u672c\u548c\u56fe\u7247\u670d\u52a1\u7684\u4e0d\u540c\u53c2\u6570\uff0c\u5e76\u63d0\u4f9b\u4e86\u76f8\u5e94\u7684\u4ee3\u7801\u5b9e\u73b0\u3002\u5347\u7ea7\u8fc7\u7a0b\u4e2d\u89e3\u51b3\u4e86MinIO\u56fe\u7247\u975e\u516c\u7f51\u8bbf\u95ee\u7684\u95ee\u9898\uff0c\u6539\u7528OSS\u5b58\u50a8\u56fe\u7247\u3002\u4e24\u4e2a\u6838\u5fc3\u65b9\u6cd5moderate\u548cmoderateImage\u5206\u522b\u5904\u7406\u6587\u672c\u548c\u56fe\u7247\u5185\u5bb9\u5ba1\u6838\uff0c\u8fd4\u56de\u5305\u542b\u5ba1\u6838\u7ed3\u679c\u7684\u4fe1\u606f\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/53301.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-12T00:04:26+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250812000424-689a85086b5b8.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/53301.html","url":"https:\/\/www.wsisp.com\/helps\/53301.html","name":"\u300a\u9ed1\u9a6c\u5934\u6761\u300bday04 \u8e29\u5751\u4ee5\u53ca\u4e60\u540e\u5206\u4eab - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-12T00:04:26+00:00","dateModified":"2025-08-12T00:04:26+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/53301.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/53301.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/53301.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u300a\u9ed1\u9a6c\u5934\u6761\u300bday04 \u8e29\u5751\u4ee5\u53ca\u4e60\u540e\u5206\u4eab"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/53301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=53301"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/53301\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/53299"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=53301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=53301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=53301"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=53301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}