??xml version="1.0" encoding="utf-8" standalone="yes"?>BlogJava-paulwonghttp://www.dentisthealthcenter.com/paulwong/zh-cnThu, 07 Dec 2023 17:45:13 GMTThu, 07 Dec 2023 17:45:13 GMT60STATE-MACHINE resourcehttp://www.dentisthealthcenter.com/paulwong/archive/2023/12/05/451309.htmlpaulwongpaulwongTue, 05 Dec 2023 02:59:00 GMThttp://www.dentisthealthcenter.com/paulwong/archive/2023/12/05/451309.htmlhttp://www.dentisthealthcenter.com/paulwong/comments/451309.htmlhttp://www.dentisthealthcenter.com/paulwong/archive/2023/12/05/451309.html#Feedback0http://www.dentisthealthcenter.com/paulwong/comments/commentRss/451309.htmlhttp://www.dentisthealthcenter.com/paulwong/services/trackbacks/451309.html https://blog.csdn.net/significantfrank/article/details/104996419

理订单状态,该上状态机吗?轻量U状态机COLA StateMachine保姆U入门教E?nbsp;
https://www.cnblogs.com/rude3knife/p/cola-statemachine.html

Spring-statemachine有限状态机(FSM)使用教程详解
https://blog.csdn.net/ZYC88888/article/details/112793317



https://github.com/alibaba/COLA/blob/master/cola-components/cola-component-statemachine/src/test/java/com/alibaba/cola/test/StateMachineChoiceTest.java


  

paulwong 2023-12-05 10:59 发表评论
]]>
如何保证同事的代码不会腐烂?一文带你了?Alibaba COLA 架构http://www.dentisthealthcenter.com/paulwong/archive/2023/12/05/451308.htmlpaulwongpaulwongTue, 05 Dec 2023 02:31:00 GMThttp://www.dentisthealthcenter.com/paulwong/archive/2023/12/05/451308.htmlhttp://www.dentisthealthcenter.com/paulwong/comments/451308.htmlhttp://www.dentisthealthcenter.com/paulwong/archive/2023/12/05/451308.html#Feedback0http://www.dentisthealthcenter.com/paulwong/comments/commentRss/451308.htmlhttp://www.dentisthealthcenter.com/paulwong/services/trackbacks/451308.html本文开始前Q问大家一个问题,你觉得一份业务代码,其是互联网业务代码Q都有哪些特点?

我能惛_的有q几点:

  • 互联|业?strong style="margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: black; visibility: visible;">q代?/strong>Q工期紧Q导?strong style="margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: black; visibility: visible;">代码l构混ؕQ几乎没有代码注释和文?/section>
  • 互联|?strong style="margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: black; visibility: visible;">人员变动频繁Q很Ҏ接手别h的老项目,ChҎ没时间吃透代码结?/strong>Q紧q的工期又只能让屎山堆大?/section>
  • 多h一起开发,每个人的~码习惯不同Q工L代码各用个的Q业务命名也l常冲突Q媄响效率?/section>
  • 大部分团队几?strong style="margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: black; visibility: visible;">没有旉做代码重?/strong>QQ׃码腐烂?/section>

每当我们新启动一个代码仓库,都是信心满满Q结构整z。但是时间越往后,代码变得腐败不堪,技术债务来庞大?/p>

q种情况有解x案吗Q也是有的:

  1. 组内定期做代码重构Q解x术债务?/section>
  2. l内设计完善的应用架构,让代码的腐烂来得慢一些?strong style="margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: black; visibility: visible;">Q当然很隑ց到完全不腐烂Q?/strong>
  3. 设计量单,让不同层U的开发都能快速看懂ƈ上手开?/strong>Q而不是在一堆复杂的没h看懂的代码上堆更多的屎山?/section>

而COLAQ我们今天的主角Q就是ؓ了提?strong style="margin: 0px; padding: 0px; outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible;">一个可落地的业务代码结构规?/strong>Q让你的代码腐烂的尽可能慢一些,让团队的开发效率尽可能快一些?br />

https://github.com/alibaba/COLA

https://blog.csdn.net/significantfrank/article/details/110934799







paulwong 2023-12-05 10:31 发表评论
]]>
reinstall Mac OShttp://www.dentisthealthcenter.com/paulwong/archive/2022/11/11/450860.htmlpaulwongpaulwongFri, 11 Nov 2022 14:44:00 GMThttp://www.dentisthealthcenter.com/paulwong/archive/2022/11/11/450860.htmlhttp://www.dentisthealthcenter.com/paulwong/comments/450860.htmlhttp://www.dentisthealthcenter.com/paulwong/archive/2022/11/11/450860.html#Feedback0http://www.dentisthealthcenter.com/paulwong/comments/commentRss/450860.htmlhttp://www.dentisthealthcenter.com/paulwong/services/trackbacks/450860.htmlhttps://support.apple.com/zh-hk/HT212030

?Mac 清除所有內容和a定

?macOS 製作開機安裝E式

如何重新安裝 macOS


paulwong 2022-11-11 22:44 发表评论
]]>
How to Downgrade macOS Ventura to Monterey, Big Sur, or Earlierhttp://www.dentisthealthcenter.com/paulwong/archive/2022/11/11/450858.htmlpaulwongpaulwongFri, 11 Nov 2022 03:27:00 GMThttp://www.dentisthealthcenter.com/paulwong/archive/2022/11/11/450858.htmlhttp://www.dentisthealthcenter.com/paulwong/comments/450858.htmlhttp://www.dentisthealthcenter.com/paulwong/archive/2022/11/11/450858.html#Feedback0http://www.dentisthealthcenter.com/paulwong/comments/commentRss/450858.htmlhttp://www.dentisthealthcenter.com/paulwong/services/trackbacks/450858.htmlhttps://www.drbuho.com/how-to/downgrade-macos




paulwong 2022-11-11 11:27 发表评论
]]>
difference between homebrew and homebrew cask http://www.dentisthealthcenter.com/paulwong/archive/2022/11/11/450857.htmlpaulwongpaulwongFri, 11 Nov 2022 03:21:00 GMThttp://www.dentisthealthcenter.com/paulwong/archive/2022/11/11/450857.htmlhttp://www.dentisthealthcenter.com/paulwong/comments/450857.htmlhttp://www.dentisthealthcenter.com/paulwong/archive/2022/11/11/450857.html#Feedback0http://www.dentisthealthcenter.com/paulwong/comments/commentRss/450857.htmlhttp://www.dentisthealthcenter.com/paulwong/services/trackbacks/450857.htmlhttps://brew.sh/index_zh-tw

difference between homebrew and homebrew cask

install jdk11 on Mac:





paulwong 2022-11-11 11:21 发表评论
]]>
install docker on Machttp://www.dentisthealthcenter.com/paulwong/archive/2022/11/11/450856.htmlpaulwongpaulwongFri, 11 Nov 2022 03:07:00 GMThttp://www.dentisthealthcenter.com/paulwong/archive/2022/11/11/450856.htmlhttp://www.dentisthealthcenter.com/paulwong/comments/450856.htmlhttp://www.dentisthealthcenter.com/paulwong/archive/2022/11/11/450856.html#Feedback0http://www.dentisthealthcenter.com/paulwong/comments/commentRss/450856.htmlhttp://www.dentisthealthcenter.com/paulwong/services/trackbacks/450856.html



paulwong 2022-11-11 11:07 发表评论
]]>
MONGODB SPRING DISTINCThttp://www.dentisthealthcenter.com/paulwong/archive/2022/10/18/450835.htmlpaulwongpaulwongTue, 18 Oct 2022 02:22:00 GMThttp://www.dentisthealthcenter.com/paulwong/archive/2022/10/18/450835.htmlhttp://www.dentisthealthcenter.com/paulwong/comments/450835.htmlhttp://www.dentisthealthcenter.com/paulwong/archive/2022/10/18/450835.html#Feedback0http://www.dentisthealthcenter.com/paulwong/comments/commentRss/450835.htmlhttp://www.dentisthealthcenter.com/paulwong/services/trackbacks/450835.html
    private boolean needReorderCheck(String requestId) {
        boolean result = false;
//        try(MongoCursor<String> mongoCursor = 
//                mongoTemplate.getCollection(mongoTemplate.getCollectionName(AccountNumProductLineIndex.class))
//                             .distinct(KEY, Filters.eq(REQUEST_ID, requestId), String.class)
//                             .iterator()
//                )
        try(MongoCursor<Document> mongoCursor = 
                mongoTemplate.getCollection(mongoTemplate.getCollectionName(AccountNumProductLineIndex.class))
                             .aggregate(
                                 Arrays.asList(
                                    Aggregates.project(
                                                    Projections.fields(
                                                                    Projections.excludeId(),
                                                                   Projections.include(KEY),
                                                                   Projections.include(REQUEST_ID)
                                                                )
                                               ),
                                    Aggregates.match(Filters.eq(REQUEST_ID, requestId)),
                                    Aggregates.group("$" + KEY)
                                 )
                              )
                             .allowDiskUse(true)
                             .iterator();
        )
        {
            String key = null;
            boolean breakMe = false;
            LOGGER.info("needReorderCheck.key --> start");
            while(mongoCursor.hasNext()) {
                if(breakMe) {
                    mongoCursor.close();
                    break;
                }
                Document keyDocument = mongoCursor.next();
                key = keyDocument.getString("_id");
//                key = mongoCursor.next().getString(KEY);
//                LOGGER.info("needReorderCheck.keyDocument --> {}, key --> {}", keyDocument, key);
                try(MongoCursor<Document> indexMongoCursor = 
                        mongoTemplate.getCollection(AccountNumProductLineIndex.COLLECTION_NAME)
                                        .find(Filters.and(Filters.eq(REQUEST_ID, requestId), Filters.eq(KEY, key)))
                                        .iterator()
                )
                {
                    int preIndex = -1, currentIndex = -1;
                    Document preIndexDocument = null, currentIndexDocument;
                    while(indexMongoCursor.hasNext()) {
                        currentIndexDocument = indexMongoCursor.next();
//                        System.out.println(currentIndexDocument.toJson());
                        if(preIndexDocument != null) {
                             currentIndex = currentIndexDocument.getInteger(INDEX);
                             preIndex = preIndexDocument.getInteger(INDEX);
                             if(currentIndex - preIndex > 1) {
                                indexMongoCursor.close();
                                breakMe = true;
                                result = true;
                                break;
                            }
                        }
                        preIndexDocument = currentIndexDocument;
                    }
                }
            }
        }
        
        return result;
    }



paulwong 2022-10-18 10:22 发表评论
]]>
SPRING JSON TIMEZONE问题大汇?/title><link>http://www.dentisthealthcenter.com/paulwong/archive/2022/09/22/450823.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Thu, 22 Sep 2022 05:18:00 GMT</pubDate><guid>http://www.dentisthealthcenter.com/paulwong/archive/2022/09/22/450823.html</guid><wfw:comment>http://www.dentisthealthcenter.com/paulwong/comments/450823.html</wfw:comment><comments>http://www.dentisthealthcenter.com/paulwong/archive/2022/09/22/450823.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.dentisthealthcenter.com/paulwong/comments/commentRss/450823.html</wfw:commentRss><trackback:ping>http://www.dentisthealthcenter.com/paulwong/services/trackbacks/450823.html</trackback:ping><description><![CDATA[<div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->@JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ", timezone="America/Phoenix")<br /><span style="color: #0000FF; ">private</span> Date date;</div><br /><img src ="http://www.dentisthealthcenter.com/paulwong/aggbug/450823.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.dentisthealthcenter.com/paulwong/" target="_blank">paulwong</a> 2022-09-22 13:18 <a href="http://www.dentisthealthcenter.com/paulwong/archive/2022/09/22/450823.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Downloading Large Files using Spring WebClienthttp://www.dentisthealthcenter.com/paulwong/archive/2022/09/22/450822.htmlpaulwongpaulwongThu, 22 Sep 2022 05:14:00 GMThttp://www.dentisthealthcenter.com/paulwong/archive/2022/09/22/450822.htmlhttp://www.dentisthealthcenter.com/paulwong/comments/450822.htmlhttp://www.dentisthealthcenter.com/paulwong/archive/2022/09/22/450822.html#Feedback0http://www.dentisthealthcenter.com/paulwong/comments/commentRss/450822.htmlhttp://www.dentisthealthcenter.com/paulwong/services/trackbacks/450822.htmlhttps://www.amitph.com/spring-webclient-large-file-download/

https://github.com/amitrp/spring-examples/blob/main/spring-webflux-webclient/src/main/java/com/amitph/spring/webclients/service/FileDownloaderWebClientService.java

import lombok.RequiredArgsConstructor;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferUtils;
import org.springframework.stereotype.Service;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.util.Objects;

@Service
@RequiredArgsConstructor
public class FileDownloaderWebClientService {
    private final WebClient webClient;

    /**
     * Reads the complete file in-memory. Thus, only useful for very large file
     
*/
    public void downloadUsingByteArray(Path destination) throws IOException {
        Mono<byte[]> monoContents = webClient
                .get()
                .uri("/largefiles/1")
                .retrieve()
                .bodyToMono(byte[].class);

        Files.write(destination, Objects.requireNonNull(monoContents.share().block()),
                StandardOpenOption.CREATE);
    }

    /**
     * Reading file using Mono will try to fit the entire file into the DataBuffer.
     * Results in exception when the file is larger than the DataBuffer capacity.
     
*/
    public void downloadUsingMono(Path destination) {
        Mono<DataBuffer> dataBuffer = webClient
                .get()
                .uri("/largefiles/1")
                .retrieve()
                .bodyToMono(DataBuffer.class);

        DataBufferUtils.write(dataBuffer, destination,
                StandardOpenOption.CREATE)
                .share().block();
    }

    /**
     * Having using Flux we can download files of any size safely.
     * Optionally, we can configure DataBuffer capacity for better memory utilization.
     
*/
    public void downloadUsingFlux(Path destination) {
        Flux<DataBuffer> dataBuffer = webClient
                .get()
                .uri("/largefiles/1")
                .retrieve()
                .bodyToFlux(DataBuffer.class);

        DataBufferUtils.write(dataBuffer, destination,
                StandardOpenOption.CREATE)
                .share().block();
    }
}


paulwong 2022-09-22 13:14 发表评论
]]>
JAVA-SECURITY资源http://www.dentisthealthcenter.com/paulwong/archive/2022/07/18/450784.htmlpaulwongpaulwongMon, 18 Jul 2022 03:09:00 GMThttp://www.dentisthealthcenter.com/paulwong/archive/2022/07/18/450784.htmlhttp://www.dentisthealthcenter.com/paulwong/comments/450784.htmlhttp://www.dentisthealthcenter.com/paulwong/archive/2022/07/18/450784.html#Feedback0http://www.dentisthealthcenter.com/paulwong/comments/commentRss/450784.htmlhttp://www.dentisthealthcenter.com/paulwong/services/trackbacks/450784.html https://www.liaoxuefeng.com/wiki/1252599548343744/1255943717668160

JAVA KEYSTORE 存储在MONGODB
默认情况下,证书是放保存在文Ӟ如果要改成MONGODB做ؓ存储界质Q则要做以下改动Q?br /> https://github.com/jmkgreen/keystore-mongo/tree/master/keystore-mongo/src/main/java/com/github/jmkgreen/keystore/mongo

关于证书,q里有你想知道的一?br />http://ifeve.com/%e5%85%b3%e4%ba%8e%e8%af%81%e4%b9%a6%e8%bf%99%e9%87%8c%e6%9c%89%e4%bd%a0%e6%83%b3%e7%9f%a5%e9%81%93%e7%9a%84%e4%b8%80%e5%88%87-md/#more-59405



paulwong 2022-07-18 11:09 发表评论
]]>
久久一级片
<noframes id="395jp"><noframes id="395jp"><video id="395jp"><video id="395jp"></video></video>
<i id="395jp"><font id="395jp"><delect id="395jp"></delect></font></i>
<nobr id="395jp"></nobr><noframes id="395jp"><noframes id="395jp"><dl id="395jp"></dl><video id="395jp"></video><noframes id="395jp"><dl id="395jp"></dl>
<video id="395jp"><video id="395jp"><dl id="395jp"></dl></video></video> <nobr id="395jp"><nobr id="395jp"><meter id="395jp"></meter></nobr></nobr>
<video id="395jp"></video><nobr id="395jp"></nobr>
<video id="395jp"></video>