java high concurrent programming and thread safety

Code has multiple threads running at the same time, and these threads may run the same code at the same time. If the result of each run is the same as that of a single thread, we think it is thread safe. Thread insecurity means that the thread does not provide access protection, and multiple threads may change the data successively, resulting i ...

Posted by Jtech inc. on Fri, 18 Oct 2019 11:59:57 -0700

Detailed introduction to the basic use of RecycleView -- beginner specific edition, absolutely practical

This paper introduces the simple use of RecycleView. Import the package of support-v7 first implementation 'com.android.support:recyclerview-v7:28.0.0' Create an XML file and add the recycleview control as shown in the figure Add an item layout for recyview Initialize recycleview in Activity and ...

Posted by konetch on Fri, 18 Oct 2019 11:29:18 -0700

Spring source code parsing, configuration file reading, bean registration

Jar package for lock analysis: spring-beans-3.2.5.RELEASE.jar How to read configuration files XmlBeanFactory xmlBeanFactory = new XmlBeanFactory(new ClassPathResource("spring-test.xml")); This is not recommended in spring 4.0, instead: ClassPathXmlApplicationContext content = new ClassPathXmlApplicationContext("classpath:spring-test.xml"); ...

Posted by madmax on Fri, 18 Oct 2019 02:22:12 -0700

[note] spring MVC + mybatis build Web development environment

After using the habit of jFinal, spring forgot... Take another note here The project structure is as follows First of all, I used maven of IDEA to process mybatis used by the database framework here. The database is mariadb, and I used FASTJSON when I used json to transfer data to the front desk. <?xml version="1.0" encoding="UTF-8"? ...

Posted by PHP_PhREEEk on Thu, 17 Oct 2019 14:36:31 -0700

Using code to send SMS

Interface specification /** * initialization *@ param serverIP required parameter server address *@ param serverPort required parameter server port *@ param softVersion required parameter REST version number */ REST($serverIP,$serverPort,$softVersion) /** *Set primary account * *@ param AccountSid master account *@ param ...

Posted by fredyap1234 on Thu, 17 Oct 2019 12:54:51 -0700

Using HIkariCP in spring MVC project

What is HIkariCP https://www.jianshu.com/p/15b... Using HikariCP data sources pom.xml <dependency> <groupId>com.zaxxer</groupId> <artifactId>HikariCP</artifactId> <version>3.3.1</version> </dependency> Spring-mvc.xml <bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy ...

Posted by tomas.srna on Thu, 17 Oct 2019 12:08:19 -0700

HTTP access protocol converted to HTTPS

Preface Recently, I plan to write an applet, and then go to the applet development platform to fill in the request legal domain name. I found that only https protocol is supported.So I try to convert HTTP to HTTPS. First, I want to talk about my configuration: Alicloud server Operating system: CentOS 7.4 64 bit Web server: Tomcat 9.+ Detailed ...

Posted by mjedman1 on Thu, 17 Oct 2019 00:12:30 -0700

Spring Boot: elegant use of the API documentation tool Swagger2

1. introduction You must have been tortured by interface documents in the development process. Due to the lightweight and low coupling of RESTful interface, we did not update the documents in time after modifying the interface, resulting in frequent complaints from the interface callers (both front-end and back-end) about the inconsistency bet ...

Posted by flOid on Wed, 16 Oct 2019 19:48:38 -0700

Spring Cloud Config: external centralized configuration management

Spring boot actual e-commerce project mall (20k+star) address: https://github.com/macrozheng/mall abstract Spring Cloud Config can provide centralized external configuration support for applications in the microservice architecture. It is divided into two parts: the server and the client. This article will introduce its usage in detail. Introd ...

Posted by summerpewp on Wed, 16 Oct 2019 19:35:59 -0700

C + + generating and parsing XML files

1.xml refers to Extensible Markup Language 2.xml is a markup language, similar to html 3.xml is designed to transfer data, not display data 4.xml tags are not predefined. Label needs to be defined by yourself The difference between XML and HTML 1.xml is not an alternative to html. 2.xml and html are designed for different purposes: 3.xml is des ...

Posted by expostfacto on Wed, 16 Oct 2019 16:05:44 -0700