Tag:processor

  • Go Negroni

    Time:2021-4-14

    brief introduction negroniIs a library that focuses on HTTP middleware. It is small, non intrusive and encourages the use of standard librariesnet/httpProcessor for(Handler)。 This article introduces the library. Why middleware? There are some logic codes, such as statistics, logs, debugging, etc., which are needed in every processor. If you add them one by one, they […]

  • Spring built in searchable dependencies

    Time:2021-4-9

    Abstractapplicationcontext has built-in searchable dependencies Bean name Bean instance Usage scenarios environment Environment object External configuration and profiles systemProperties java.util.Properties object Java system properties systemEnvironment java.util.Map object Operating system environment variables messageSource Message source object International copywriting lifecycleProcessor Lifecycle processor object Lifecycle bean processor applicationEventMulticaster Applicationeventmulticast object Spring event broadcaster Annotation driven spring application context […]

  • Event subscribers for laravel

    Time:2021-4-6

    Event Subscriber stayLaravel’s event systemAn event can correspond to multiple listeners, but a listener only listens to one event. If you want to subscribe to multiple events in a class, for example, when order delivery, sign in and return events occur, you need to “send SMS”. How to deal with this? You can use event […]

  • svg

    Time:2021-4-3

    Inline svg What is SVG? Svg refers to scalable vector graphics SVG is used to define vector based graphics for networks Svg uses XML format to define graphics The quality of SVG image will not be lost when it is enlarged or changed SVG is the standard of the World Wide Web Consortium Svg advantages […]

  • test2

    Time:2021-4-3

    Test2 new to fwq 1. Setting – XMS = – Xmx goes without saying 2. The initial heap memory allocated by the JVM is specified by – XMS, which is 1 / 64 of the physical memory by default; the maximum heap memory allocated by the JVM is specified by – Xmx, which is 1 […]

  • Notes on java thread properties

    Time:2021-3-31

    1. Interrupt thread When the interrupt method is called on a thread, the interrupt state of the thread is set. This is the Boolean state that every thread has. Each thread should check this flag from time to time to determine whether the thread is interrupted.To find out if the interrupt state is set, first […]

  • Starting from bin / swoft, read the source code of swoft framework (1) — initialization of application

    Time:2021-3-26

    bean/swoftThe code in is as follows: //Introduction bootstrap.php file //In fact bootstrap.php Only one thing: introduce / vendor/ autoload.php //By autoload.php To load library classes in a project // Bootstrap require_once __DIR__ . ‘/bootstrap.php’; //Set the maximum number of coroutines SwooleCoroutine::set([ ‘max_coroutine’ => 300000, ]); //Instantiate application //Call the run method of application to execute […]

  • Rethinking of eventbus / eventqueue

    Time:2021-3-25

    Rethinking of eventbus / eventqueue Intro I’ve written two articles on building wheel seriesEventBus/EventQueueIn retrospect, I think there is something wrong with my current ideaEvenStoreThere may be some misunderstanding. If you are interested, you can refer to it https://www.cnblogs.com/weihanli/p/implement-a-simple-event-bus.html/https :// www.cnblogs.com/weihanli/p/implement-event-queue.html , Recently, the event related logic has been refactored and modifiedEventStore, introducedIEventHandlerFactoryAnd redesigned the […]

  • Starting from bin / swoft, read the source code of swoft framework (2) — the run method of application

    Time:2021-3-25

    After application initialization, only one action is done: runThis chapter starts with the run method, and gradually goes deep into the subsequent calls First look at the code of run public function run(): void { try { if (!$this->beforeRun()) { return; } $this->processor->handle(); } catch (Throwable $e) { //If the code execution is abnormal, it […]

  • Starting from bin / swoft, read the source code of swoft framework (3) — envprocessor

    Time:2021-3-24

    Swoft\Processor\EnvProcessorIs the processor of the first call after the application executes run Handle method code: public function handle(): bool { if (!$this->application->beforeEnv()) { CLog::warning(‘Stop env processor by beforeEnv return false’); return false; } //Get the real path of Env file according to the alias of Env file $envFile = Swoft::getAlias($this->application->getEnvFile()); // Fix: In phar package, […]

  • Starting from bin / swoft, read the source code of swoft framework (4) — configprocessor

    Time:2021-3-22

    The processor is so simple that it doesn’t even need a chapterSwoft takes it as a single processor, which should be to meet its design idea Since env processor has loaded the contents of. Env file into PHP environment, config processor calls env method (internal call getenv method) to set app_ Debug and swoft_ Debug […]

  • Start with bin / swoft and read the source code of swoft framework (5) — annotation processor

    Time:2021-3-20

    Annotation is one of the features of swoft. Almost all business codes in swoft project cannot do without annotationsAnnotation processor is the core dependency of swoft to use components in business After processing by the annotation processor, a data structure of this type will be saved in the annotation processor /**Comments on the structure of […]