Tag:Overall situation

  • Performance analysis of Vue project and application of CDN

    Time:2022-5-9

    Performance analysis of Vue project and application of CDN performance analysis We integrate functions and write many components, which will eventually be packaged into a pile of files. How about the performance of real operation? We can use the performance analysis tools provided by Vue cli to package and analyze all the functions we have […]

  • DRF (VI) – parser

    Time:2022-5-5

    DRF (VI) – parser Problem elicitation:Request headers generally take many forms. The most common isjsonForm, andform-data。 JSON is the most common form. The parser is generally used to parse the data sent by the user; 1. Request header requirements # django:request.POST/ request.body # Content-Type: application/x-www-form-urlencoded #PS: if content type: application / x-www-form-urlencoded in the request […]

  • Vue3 + vite + TS + element plus construction project (II)

    Time:2022-5-5

    In the last phase, we installed vite, managed the code to git, and used eslint to verify. Next, we installed vuex, router, SCSS, alias settings, etc. in the project 1、 Vuerouter Official website:https://router.vuejs.org/guid… 1. Installation npm install [email protected] 2. After installation, we will create a router directory under SRC directory and an index under router […]

  • Springboot custom exception handling

    Time:2022-5-5

    Global exception handling @ControllerAdvice @RestController public class GlobalExceptionInterceptor { //Exception exception @ExceptionHandler(value = Exception.class) @ResponseBody public Result exceptionHandler(Exception e){ e.printStackTrace(); LogUtil.writeLog(“error”,”log”,e.getMessage()+e.getStackTrace()); Result result = Result.errorResult(); if (e.getClass().equals(HttpMediaTypeNotSupportedException.class)){ result.setCode(-981); result. Setmsg (“request parameter format error”); }else{ result.setCode(-998); result. Setmsg (“system execution error”); } return result; } //Runtime exception @ExceptionHandler(value = RuntimeException.class) @ResponseBody public Result exceptionHandler(RuntimeException e){ […]

  • Vue programmed route navigation and route guard

    Time:2022-5-4

    Replace attribute of Function: control the mode of operating browser history during route jump There are two ways to write browser history: push and replace. Push is to add history, replace is to replace the current record, and push is to switch routes How to enable replace mode: news Programmed route navigation Function: without the […]

  • Mac multi node version free switching

    Time:2022-4-30

    Because some old projects are not compatible with the new node version, sometimes we need to install multiple nodes and automatically switch different node versions at any time for relevant project testing. Recently, I happened to encounter such a problem. Record the solution I found: 1. First, we need to use NPM to install the […]

  • Ultimate solution: quickly solve the dependency conflict of Android project

    Time:2022-4-23

    Are you still struggling to rely on conflict? Do you feel overwhelmed when gradle reports duplicate jar packages or duplicate classes? Well, this article teaches youCompletely solve the problem of dependency conflict ~ The types of conflicts are nothing more than duplicate classes and jar packages, such as: image-20210714115838934 I won’t introduce more here. Let’s […]

  • NPM custom global command

    Time:2022-4-21

    NPM custom global commandInstall node global command 1、 Create package JSON file, and the creation command is hello { “name”: “demo”, “version”: “1.0.0”, “dependencies”: { }, “bin”: { “hello”: “./index.js” } } 2、 Set the result of file run index js #!/usr/bin/env node console.log(‘hello world’) 3、 In the global installation (to be installed under the […]

  • Mybatis log framework

    Time:2022-4-15

    This article mainly talks about the logging framework of mybatis and reveals how mybtais can integrate various logging frameworks. Knowledge points How to print logs Custom log implementation Implementation principle How to print logs We occasionally encounter some problems when using mybatis. If we want to see what the SQL we execute is like, we […]

  • How vuejs encapsulates a plug-in (take Vue toast as an example)

    Time:2022-4-15

    Plug in introduction Plug ins typically add global functionality to Vue. There is no limit to the scope of plug-ins – there are generally the following types: 1. Add global methods or attributes, such as:vue-custom-element 2. Add global resources: instruction / filter / transition, etcvue-touch 3. Add some component options through the global mixin method, […]

  • The benefits of ThinkPHP based development are as follows:

    Time:2022-4-13

    Series articles: Do you have a good free source project download address or website? Welcome to recommend ha! The benefits of ThinkPHP based development are as follows: Many programmers like to compare frameworks, which are both performance and force. To be honest, TP must be more practical for small enterprises. It’s good to recruit people […]

  • Webpack installation

    Time:2022-4-11

    In this section, let’s learnwebpack4.0Installation of,webpackThe operation of depends on node JS running environment, in the installationwebpackIt also needs to be usednpm, so we need to install it firstNode.js,Node.jsComes with package managernpm。 webpackneedNode.js v0.6The above versions are supported, so it is recommended to use the latest version. The installation address is:https://nodejs.org/en/download/, if you are not […]