Introduction

Magnesium and its alloys have attracted significant interest as potential orthopedic implant materials, due to their good biocompatibility, excellent mechanical properties, suitable density, and favorable biodegradation, which can avoid secondary surgery for implant removal.1,2,3,4 Nevertheless, their high degradation rate accompanied by hydrogen evolution in the physiological environment would result in the loss of mechanical integrity prematurely, which limits their clinical applications.5,6 Surface coating modification of Mg alloys has been demonstrated to be one of the most effective methods to retard corrosion and improve bioactivity.7,8,9,10,11 Sun et al.12 prepared a hydroxyapatite coating with micro-/nanostructured flower-like clusters on AZ31 magnesium alloy using a simple hydrothermal method, which has good long-term corrosion resistance. Following 147 days of immersion in simulated body fluids (SBF), the samples maintained their pristine macroscopic morphology and showed a rapid mineralization capability. This characteristic is expected to extend implantation of magnesium alloy and facilitate bone healing. Bakhsheshi-Rad et al.13 fabricated the Si/poly (ε-caprolactone) (PCL) coating on the Mg alloy, which significantly enhanced the corrosion resistance of the Mg alloy together with a better bonding strength.

However, another important reason for the failure of orthopedic implant surgery is bacterial infection.14 The good antimicrobial properties of magnesium alloys in a physiological environment are related to the strongly alkaline environment caused by the rapid corrosion of Mg alloys, which will disrupt the mechanical integrity of the implant.15 The coating-modified magnesium alloy greatly improved its corrosion resistance but also weakened the antibacterial effect.16 Therefore, on the basis of solving the corrosion of magnesium alloys, improving the antibacterial function is another important issue to be addressed. One of the commonly used methods is to load biocides on the coating, and the degradation of the magnesium alloy will be accompanied by the release of biocides, thus achieving the purpose of sterilization.17,18 For example, Chen et al.19 reported that the antibacterial ability of zinc implants was enhanced by microadding magnesium and silver to the implant. With the release of Zn and Ag ions during degradation, the antibacterial rate of the samples reached 98.6%. Yang et al.20 studied the antibacterial properties of Cu-doped mesoporous bioactive glass (Cu-MBG) impregnated Mg-based scaffold. As the degradation of the Mg matrix and Cu-MBG was able to release Cu ions, the antimicrobial effect was achieved. Although biocides do significantly reduce bacterial proliferation, concerns are growing that the increasing use of biocides will lead to higher levels of bacterial resistance.21,22,23

In recent years, superhydrophobic surfaces have been widely studied for their self-cleaning,24 antipollution,25 anti-icing,26 anticorrosion27, and oil–water separation28 properties. Superhydrophobic means that water droplets are spherical on solid surfaces, with contact angles of more than 150° and roll angles of less than 10°.29,30 Also, superhydrophobic surface modifications have been used to enhance the corrosion resistance of metals and the antimicrobial properties of implants by forming an air layer between solid and liquid surfaces through the combination of rough structure and low surface energy.31,32 Tian et al.33 prepared superhydrophobic coatings on the surface of LA103Z alloy by a one-step electrochemical process, which significantly improved the corrosion resistance of Mg–Li alloys in seawater. Manivasagam et al.34 reported a superhydrophobic coating with a micro-/nanostructure on a titanium surface, which resisted bacterial adhesion by more than 90% after 24 h of co-culture with bacteria.

In this work, the hydroxyapatite coating with a micro-/nanostructure was prepared on AZ31 magnesium alloy by hydrothermal method to provide a rough surface structure and then treated with a long-chain saturated fatty acid (lauric acid) solution to ensure a lower surface energy, thus achieving superhydrophobicity. Furthermore, the corrosion resistance and antibacterial properties of the coating were investigated by electrochemical test and bacterial experiments.

Materials and methods

Preparation of hydroxyapatite coating

AZ31B magnesium alloy (3Al-1Zn-0.2Mn-Fe < 0.005, in wt%) was cut to 10 mm × 10 mm × 2 mm and gradually sanded on 800, 1500, and 2000 grit SiC sandpaper, after which it was super-cleaned in alcohol for 20 min and dried in an oven. The polished magnesium alloy, which was marked as sample Mg, was treated in a 1.5 M NaOH solution at 80 °C for 1 h. The alkali-treated samples were subjected to a hydrothermal reaction at 120 °C for 24 h. The hydrothermal solution was an aqueous solution of 0.3 M KH2PO4 and 0.3 M C10H12CaN2Na2O8 (EDTA-2NaCa). The method was derived from previous literature,12 and the hydrothermal prepared hydroxyapatite-coated magnesium alloy was marked as sample HA.

Preparation of HA/LA superhydrophobic composite coating

The prepared HA coating samples were immersed in a solution of 0.05 M, 0.10 M, and 0.15 M lauric acid dissolved in ethanol at the temperature of 80 °C for 2 h. The obtained samples were dried in a vacuum oven at 100 °C for 24 h and marked as samples LH5, LH10, and LH15, respectively.

Sample characterizations

The phase composition of the coating was analyzed using X-ray diffractometry (XRD, D8 Advance, Bruker, Germany) with a 2θ angle ranging from 5° to 70° in an offset coupled scan configuration. The microstructure of the composite coatings was examined using a cold field emission scanning electron microscope (SEM, S-4800, Hitachi, Japan) operated at 5 kV, accompanied by energy dispersion spectroscopy (EDS, X-MAX20, Oxford UK) at 15 kV for elemental analysis. The composition of the functional groups on the surface of the different samples was analyzed by Fourier transform infrared spectrometer (FTIR, Thermo Scientific, America). The contact and rolling angles of the sample surface were determined by a droplet shape analyzer (DSA100, Krüss, Germany) with 5 μL of deionized water at room temperature. The roughness of the samples was assessed using a true color confocal microscope (Zeiss CSM700, Heidenheimer, Germany). Three regions on the samples were randomly selected for contact angle and roughness testing and the average values were taken.

Bonding strength test

The bonding strength between the coating and the magnesium alloy substrate was tested by pulling method using the electronic universal testing machine (XWW, Beijing, China). The coated magnesium alloy sample was fixed between two metal cylinders using epoxy resin adhesive and then fixed to the universal testing machine fixture. Gradually increasing the applied loading until the samples suddenly fractured, the maximum applied loading at this point was recorded, and the bonding strength between the coating and the magnesium alloy substrate was subsequently calculated according to equation (1).

$$P=F/S$$
(1)

where P is the bonding strength of samples (MPa), F is the tensile load of failure (N), and S is the surface area of samples (mm2).

Electrochemical test

The corrosion behavior of various samples was examined through dynamic potential polarization curve test and electrochemical impedance spectroscopy (EIS) using an electrochemical workstation (CHI660E, Chenhua, Shanghai). A standard three-electrode system was used for the electrochemical experiments, in which a saturated calomel electrode was used as the reference electrode, a platinum electrode as the auxiliary electrode, and a 10 mm2 exposed area of the prepared samples as the working electrode, which were immersed in simulated body fluid (SBF) at 37 °C during the test. The final results were obtained by averaging the three tests.

Long-term corrosion resistance test

The naked magnesium alloy and the coated magnesium alloy samples were immersed in SBF solution for a period of time, the SBF solution was renewed every other day, and the pH of the SBF solution was tested with a precision pH meter. Meanwhile, the corrosion rate was calculated by the following equation:

$${V}_{corr}=\omega /(At\rho )$$
(2)

where ω means the mass of the sample lost during the immersion period, A means the area of the sample in direct contact with the SBF solution, and t and ρ mean the immersion time of the sample and the density of the AZ31B magnesium alloy matrix, respectively.

In vitro antibacterial activity

The samples were incubated with Gram-positive Staphylococcus aureus (S. aureus) and Gram-negative Escherichia coli (E. coli) bacterial suspensions at a concentration of ~ 109 cells/mL for 4 h, 6 h, and 8 h, respectively, in 24-well plates at 37 °C. The nonadherent and loosely adherent bacteria were subsequently rinsed five times with phosphate-buffered saline (PBS) to remove them. Subsequently, the samples were fixed in a 2.5% glutaraldehyde solution for 2 h and then subjected to immersion in ethanol solutions of 30%, 50%, 70%, 90%, and 100% v/v individually for 15 min each. Next, they were observed under SEM and the number of bacteria on each image was counted. In the meantime, the above-mentioned samples after rinsing with PBS were also stained with BBcellProbe® N01/PI green–red fluorescent probes, and then bacterial adhesion was observed with an inverted microscope (IX7S, Olympus, Japan). Antibacterial adhesion rate was calculated using equation (3).

$$\text{antibacterial adhesion rate} (\mathrm{\%}) = \left(1 -\frac{S\left(sample\, LH10\right)}{S\left(sample\, HA\right)}\right)\times 100\mathrm{\%}$$
(3)

where S(sample HA) represents the fluorescence area of bacteria adhering to the surface of sample HA, and S(sample LH10) represents the fluorescence area of bacteria adhering to the surface of sample LH10.

Results and discussion

Effects of lauric acid concentration on coating composition and microstructure

The phase composition of sample HA and composite coating samples LH5, LH10, and LH15 (treatment with different concentrations of lauric acid) are shown in Fig. 1a. It was determined that all coated samples were mainly composed of α-magnesium (JCPDS No. 35-0821), hexagonal hydroxyapatite (JCPDS No. 74-0566), and magnesium hydroxide (Mg(OH)2, JCPDS No. 76-0667). Mg(OH)2 on the sample surfaces of magnesium alloys is formed during the alkali treatment, which can prevent corrosion reactions with hydrothermal solutions and can also provide nucleation sites (–OH) for the development of hydroxyapatite during hydrothermal reactions.35,36,37 The XRD patterns of the composite coating samples were similar to those of the hydrothermal sample HA, indicating that the main phase of the coating remained hydroxyapatite after lauric acid treatment, and no significant changes occurred. However, the relative intensities of the diffraction peaks of the crystals changed after lauric acid treatment with different concentrations. The diffraction peaks of α-magnesium, hydroxyapatite, and Mg(OH)2 are all weakened to varying degrees. This is probably due to the increased content of lauric acid on the surface of the coating, which leads to an increase in the thickness of the coating, thereby weakening the diffraction peak intensity of the surface composition phases.

Fig. 1
figure 1

XRD patterns of different coated samples (a); FTIR spectra of samples pure lauric, HA and LH5 (b)

To further confirm the presence of lauric acid on the surface of the coating, the FTIR spectra of lauric acid treated samples were tested and the results were compared with pure lauric acid. The FTIR spectra of samples LH5, LH10, and LH15 were similar, so the sample LH5 was selected for the later research. As shown in Fig. 1b, the absorption peaks of samples HA and LH5 at 995 cm-1 and 963 cm-1 are characteristic peaks for the PO43 stretching mode, and the other absorption peak at 3570 cm-1 is –OH group, all of which are derived from hydroxyapatite.38 Compared with sample pure lauric acid, almost all absorption peaks of sample LH5 can correspond to sample pure lauric acid, such as the asymmetric and symmetric telescopic vibrational peaks of C–H at 2916  and 2848 cm-1, the asymmetric and symmetric bending vibrational peaks of C–H at 1446 cm-1 and 1411 cm-1, and C=O stretching vibration peak at 1698 cm-139. In the meantime, no new functional groups are observed on the soaked sample LH5. From the above results, it can be concluded that lauric acid was successfully loaded onto the hydroxyapatite coating and probably existing in the form of physical adsorption.

It is well known that coating composition and microstructure are important factors affecting surface superhydrophobicity. Figure 2 presents the surface micrographs of the hydrothermal synthesized sample HA and composite coatings by lauric acid treatment with different concentrations. Figure 2a and 2e shows that the coating of sample HA is distributed with the microsized flower-like cluster composed of hexagonal columnar crystals with diameters of 50–300 nm, providing a micro- and nanograded structure for the subsequent construction of superhydrophobic coating. After treatment with 0.05 M and 0.10 M lauric acid ethanol solution, respectively, the coating structure did not change significantly (Fig. 2b and 2c) and the grains remained hexagonal in shape (Fig. 2f and g). However, when the concentration of lauric acid was increased to 0.15 M, a plate-like structure was formed on the hydroxyapatite coating, covering the original columnar structure (Fig. 2d and 2h), which will change the micro- and nanograded structure of the coating, and finally affect the wettability of the coating surface. In order to clarify the effect of lauric acid treatment on the surface composition of the coating, an EDS test (Fig. 2i–2l) was conducted and the results suggested that the content of element C on the composite coating increased significantly with the increase of lauric acid concentrations, demonstrating that more lauric acid was loaded on the surface of sample HA. In addition, the sample LH10 (superhydrophobic sample, Fig. 3) was selected for coating cross-sectional analysis and bond strength analysis. As shown in Fig. S1, the thickness of the HA/LA coating was about 7.19 μm. However, no obvious lauric acid coating was observed, which was probably due to the lauric acid coating attached to the hydroxyapatite nanopillar being too thin in thickness. The bonding strength of sample LH10 surface coating to Mg alloy substrate is 16.4 ± 0.6 MPa (Fig. S2), which is greater than 15 MPa and meets the bonding strength requirements for biomedical applications (ISO 13779-2 standard).40

Fig. 2
figure 2

Microscopic morphology and EDS patterns of different samples: HA (a, e); LH5 (b, f); LH10 (c, g); LH15 (d, h); (i, j, k, l) are the EDS spectra of the regions (e, f, g, h), respectively

Fig. 3
figure 3

Wettability of different sample surfaces

Effects of lauric acid concentration on contact angles

The contact and rolling angles of the different coated samples are shown in Fig. 3. For sample Mg alloy, the contact angle was 30.2 ± 1.4°, indicating hydrophilic property. When sample Mg alloy was only treated by hydrothermal reaction (sample HA) or lauric acid with 0.10 M (sample LM10), the corresponding contact angles of sample HA and sample LM10 were 0° and 100.5 ± 2.7°, respectively. The pronounced superhydrophilicity of sample HA primarily arises from its rough surface morphology and the existence of hydrophilic –OH functional groups on the surface of hydroxyapatite coating, while the apparent contact angle of sample LM10 was 100.5 ± 2.7°, which is due to the presence of –CH3 and –CH2– groups in the lauric acid, reducing the surface-free energy and leading to an increase in contact angle.41,42 However, it is still far from the superhydrophobic surface. When sample HA was further modified with 0.05 M, 0.10 M, and 0.15 M lauric acid ethanol solutions, the contact angles of composite coatings were 70.6 ± 2.1°, 152.5 ± 1.2°, and 130.6 ± 3.1°, respectively, with rolling angles of 10.0 ± 0.7°, 1.5 ± 0.3°, and 5.0 ± 0.5°. It was found that only the contact angle of sample LH10 was greater than 150°, meaning superhydrophobic.

Generally, the hydrophobicity of the material surface is also greatly affected by the surface roughness,43,44 so the roughness of samples HA, LH5, LH10, and LH15 was tested and the results are shown in Fig. 4. Compared with sample HA (Ra = 3.12 ± 0.13), the surface roughness of all composite coating samples appeared to have varying decreases, and sample LH10 appeared to have a minimum decrease (Ra = 3.04 ± 0.15). When the lauric acid concentration was 0.05 M, the surface roughness of sample LH5 was 2.92 ± 0.10, showing a slight decrease, suggesting that the surface morphology of the coating did not change obviously (Fig. 2a and 2e). For sample LH15 obtained by immersing in a lauric acid concentration of 0.15 M, the surface roughness decreased to 2.14 ± 0.18. This can be explained by the fact that a high concentration of lauric acid covered the underlying hydroxyapatite coating, thus changing the surface topography (Fig. 2d and 2h) and leading to the decrease of the surface roughness. Usually, the realization of superhydrophobicity requires a combination of suitable surface roughness derived from micro- and nanostructures and low surface energy. The above results can be further explained by the Wenzel equation (4) and the Cassie–Baxter equation (5).45

Fig. 4
figure 4

Surface roughness of different samples

$$cos{\theta }^{*}=rcos\theta$$
(4)
$$cos{\theta }^{*}=f\left(1+cos\theta \right)-1$$
(5)

In the equation, θ* and θ are the contact angle of a real surface and the contact angle of a smooth surface, respectively; r is the roughness and f is the solid/liquid contact area fraction on the surface. The surface of sample LH5 is not completely covered with lauric acid, resulting in a large number of hydroxyl groups in contact with water, which increases the solid-liquid contact area fraction (f) and ultimately leads to a decrease in θ. For sample LH15, the contact angle was reduced to varying degrees as the lauric acid formed a plate-like structure on the hydroxyapatite surface, resulting in a significant reduction in roughness. In addition, the contact angle of sample LH10 (152.5 ± 1.2°) is greater than that of sample LM10 (100.5 ± 2.7°), which is attributed to the formation of nanopillar hydroxyapatite after hydrothermal reaction that increases the roughness of sample LH10. The above results further prove that the superhydrophobicity of the composite coating results from the synergistic effect of micro-/nanostructure and low surface energy.

Corrosion resistance

According to the osteogenic cycle, magnesium implant materials need to maintain mechanical integrity in the body for 3–4 months.46,47 A Tafel polarization method was used to investigate the corrosion resistance of sample Mg and different coated magnesium alloys. Figure 5a shows the Tafel polarization curves for the different samples, and Table 1 shows the values of corrosion current density (icorr) and positive corrosion potential (Ecorr). Lower icorr and higher Ecorr represent slower corrosion rates and better corrosion resistance of the samples.48 The icorr of sample HA is 0.99 ± 0.05 μA/cm2, only 1/40 of bare magnesium alloys. When sample HA was modified with 0.10 M lauric acid (sample LH10), the corrosion current density of sample LH10 was reduced by a factor of approximately three compared to that of sample HA. This is due to the formation of an air layer on the surface of the superhydrophobic composite coating, which effectively blocks the contact between the solution and the surface of sample LH10, improving its corrosion resistance.49

Fig. 5
figure 5

Tafel polarization curve (a); EIS spectra (b); an equivalent circuit diagram (c, d, e) of sample Mg, sample HA, and sample LH10, respectively

Table 1 Corrosion performance of different samples

For a more comprehensive analysis of the corrosion and degradation characteristics of the composite-coated magnesium alloys, electrochemical impedance spectroscopy (EIS) was employed to examine samples Mg, HA, and LH10, as illustrated in Fig. 5b and S3. The low-frequency impedance modulus (|Z|0.01 Hz) serves as an additional indicator for assessing the corrosion resistance of a sample; the higher the low-frequency impedance modulus, the better the corrosion resistance.50 The naked magnesium alloy shows the worst corrosion resistance with the |Z|0.01 Hz of 0.52 ± 0.04 kΩ cm2, and the Nyquist plot shows an induced reactance in the low-frequency section, indicating that pitting had occurred.51 The superhydrophobic sample LH10 exhibits the best corrosion resistance with the |Z|0.01 Hz of 132.79 ± 10.23 kΩ cm2, approximately four times that of sample HA, an improvement of two orders of magnitude over the naked magnesium alloy. This result is consistent with the findings of the Tafel polarization curves. As shown in Fig. S4, the low-frequency impedance modulus (|Z|0.01 Hz) of samples LH5 and LH15 is 39.50 ± 2.91 kΩ cm2 and 44.71 ± 3.15 kΩ cm2, respectively. This is due to the fact that the contact angle of samples LH5 and LH15 did not reach 150° and no air layer was formed, so samples LH5 and LH10 will not be discussed subsequently. Figure 5c, 5d, and 5e and Table 2 show the fitted curve circuits for the EIS curves for the different samples, together with the corresponding electrochemistry parameters. The constant phase angle element is adopted instead of a capacitor (C).52 The fitted curve circuit for naked magnesium alloys references previous literature,53 where Rs is the solution resistance, Rct, Qdl, Rco, and Qco are the resistance and capacitance of the charge transfer generated and the resistance and capacitance of the protective layer (Mg(OH)2 formed during the corrosion process). LL is inductance and RL is the resistance associated with LL. The equivalent circuit diagram of the metal surface covered with the coating is usually fitted as in Fig. 5d.54,55 Rco and Qco represent the resistance and capacitance of the HA coating. Due to the presence of the air layer, Fig. 5e was used to simulate the corrosion process of the superhydrophobic sample LH10, where Rair and Qair are the resistance and capacitance of the air layer, respectively. Rct, Rco, and Rair respond to the corrosion resistance of the coating, while Qdl, Qco, and Qair can be used to estimate the degree of penetration of corrosive substances into the coating. Sample HA shows a much higher Rct/Rco, a much lower Qco/Qair, and the disappearance of its induction circuit compared to bare magnesium, indicating that the coating effectively prevents corrosion of the magnesium alloy. Furthermore, compared to sample HA, sample LH10 displays a twofold and tenfold increase in Rct and Rco, and a twofold and tenfold decrease in Qdl and Qco, respectively. Due to the rough structure of hydroxyapatite and the low surface energy of lauric acid, air can be trapped on the surface of sample LH10, thus forming an air layer (Rair and Qair), which further enhances the corrosion resistance of the magnesium alloy and thus slowing down the penetration of corrosive substances.56

Table 2 Electrochemical impedance fitting parameters for different samples

To evaluate the long-term corrosion resistance of the coated magnesium alloys, immersion experiments were conducted in SBF solution and the pH and corrosion rates were recorded for different immersion times. As shown in Fig. 6a, the pH values of the SBF solution immersed magnesium alloy increased rapidly and reached a maximum value of 11.21 ± 0.25 at 17 days. This is due to the lower electrochemical potential of magnesium, which is easily corroded in physiological environments, resulting in a rapid rise in pH. In contrast, the pH of the SBF solution varied within a small range after immersing sample HA and sample LH10, respectively, indicating that both samples exhibited good long-term corrosion resistance. During the whole immersion period, the pH changing range of the SBF solution after immersing sample LH10 (7.35–7.54) was smaller than that of sample HA (7.21–7.61), which was closer to the human physiological environment (7.35–7.45). Also, sample LH10 showed a lower corrosion rate than sample HA during the whole immersion period (Fig. 6b). This could be due to the uniform distribution of lauric acid on the hydroxyapatite trapping the air layer, which effectively decelerates the contact between the SBF solution and the lauric acid-modified hydroxyapatite.

Fig. 6
figure 6

Samples Mg alloy, HA, and LH10 after immersion in SBF solution for different times: pH values of SBF solution (a); corrosion rates (b)

Antimicrobial properties

As an implant for clinical application, magnesium alloy not only needs to have good biocompatibility and excellent corrosion resistance, but also good antimicrobial properties during the initial 4-6 h of implantation, which directly determines the success or failure of the procedure.57,58 In order to evaluate the antibacterial performance of different samples, first, SEM was used to directly observe the adhesion of E. coli and S. aureus on different samples. Figure 7 shows the morphology of sample Mg alloy, sample HA, and sample LH10 after co-culture with E. coli for 4 h, 6 h, and 8 h, respectively. As shown in Fig. 7a, 7b, and 7c, after co-cultivation with E. coli for 4 h, a small amount of E. coli adhered to the surfaces of naked magnesium alloy and sample HA, while there was no bacterial adherence on the surface of sample LH10. After 6 h of incubation, the number of bacteria on the sample Mg (Fig. 7d) decreased, while the number of E. coli on the sample HA surface increased, but only one E. coli was present on the sample LH10 surface (Fig. 7f). When the incubation time was increased to 8 h, the number of E. coli on the sample Mg alloy surface (Fig. 7g) decreased again, while the E. coli on the sample HA surface (Fig. 7h) increased dramatically and clustered together in a conglomerate. In contrast, there were only a few E. coli on the LH10 surface (Fig. 7i).

Fig. 7
figure 7

SEM images of samples Mg (a, d, g), HA (b, e, h), and LH10 (c, f, i) after co-culture with E. coli for 4 h, 6 h, and 8 h, respectively

Figure 8 shows the morphology of the samples Mg, HA, and LH10 after co-culture with S. aureus for 4 h, 6 h, and 8 h, respectively. The adhesion of S. aureus on the surface of different samples was almost the same as that of E. coli. As shown in Fig. 8a, 8d, and 8g, with the increase of incubation time, the number of S. aureus bacteria adhering to the surface of bare magnesium alloy decreased and the number of S. aureus on the surface of sample HA gradually increased. The sample LH10 was almost free of bacterial adhesion on the surface after incubation with S. aureus for 4 h, 6 h, and 8 h. Comparing the adhesion of bacteria on samples HA and LH10, the sample LH10 significantly inhibited the adhesion of E. coli and S. aureus.

Fig. 8
figure 8

SEM images of samples Mg (a, d, g), HA (b, e, h), and LH10 (c, f, i) after co-culture with S. aureus for 4 h, 6 h, and 8 h, respectively

Fluorescent images of bacterial adhesion were recorded to further evaluate the antibacterial performance of the superhydrophobic composite coating-coated magnesium alloy. In order to quantify the antibacterial effect, the area of adhered bacteria on the fluorescent images was calculated using ImageJ software. Figure 9a and 9c shows that the fluorescence area on the LH10 sample is very small compared to sample HA for the same incubation time. After 4 h, 6 h, and 8 h of incubation, the adherent area of E. coli on sample LH10 was significantly reduced by 99.7%, 99.4%, and 99.6% (Fig. 9b), and the adherent area of S. aureus was also reduced by 98.4%, 99.4%, and 99.0% (Fig. 9d), indicating that sample LH10 exhibits excellent resistance to bacterial adhesion owing to the superhydrophobic surface, which is able to resist most bacterial adhesion (over 98%) within 4–8 hours of co-culture.

Fig. 9
figure 9

Antibacterial adhesion properties of different samples. Fluorescence images of samples HA and LH10 after co-culture with E. coli for 4 h, 6 h, and 8 h, respectively (a); E. coli coverage statistics (b); fluorescence images of samples HA and LH10 after co-culture with S. aureus for 4 h, 6 h, and 8 h (c); coverage statistics of S. aureus (d)

Numerous studies have confirmed that bacterial adherence to the material surface and subsequent biofilm formation are the first step in bacterial colonization leading to infection when the implanted material is inserted into the body.59 With the increase of incubation time, the number of bacteria adhering to the bare magnesium alloy decreases, which is probably due to the increase of the solution pH caused by magnesium corrosion and results in bacterial death, thus a few bacteria adhering to the magnesium alloy.60 For sample HA, bacteria were able to easily contact the clusters formed by the hydroxyapatite nanopillars due to a contact angle of 0°, and subsequently the biofilm colonized on the surface, with more bacteria adhering to the sample surface as the incubation time increased. In contrast, the surface of sample LH10 features not only the micro-/nanostructure of hydroxyapatite but also the low surface energy of lauric acid modification, and it is the synergistic effect of the micro-/nanostructure and the low surface energy that makes the surface of the sample capture the air layer.61 In the process of bacterial infection, since there is an air layer between the bacteria and the surface of the material, which blocks the contact between the bacteria and the material, the bacteria cannot adhere to the surface of the material, thus preventing the formation of the biofilm on the surface of the material. Therefore, the superhydrophobic sample LH10 displays good antibacterial performance.

Conclusions

In this work, superhydrophobic hydroxyapatite/lauric acid composite coatings were successfully prepared on AZ31 magnesium alloy by combining hydrothermal method and immersion treatment in 0.1 M lauric acid ethanol solution at 80 °C for 2 h. The contact angle and rolling angle of the superhydrophobic composite coating are 152.5° ± 1.2° and 1.5° ± 0.3°, respectively. By studying the corrosion behavior in SBF solution, the low-frequency impedance modulus of the superhydrophobic composite coating sample (132.79 ± 10.23 kΩ cm2) significantly exceeded that of the sample HA and magnesium alloy, together with the relatively positive corrosion potential (−  1.414 ± 0.014 V) and the lowest corrosion current density (0.30 ± 0.02 μA/cm2). Moreover, long-term immersion testing showed that the pH of the SBF solution after immersing the superhydrophobic composite coating (7.35–7.54) is more in line with the human physiological environment (7.35–7.45) and the corrosion rate was minimized. These indicate a significant improvement in the corrosion resistance of magnesium alloys. The results of in vitro antibacterial experiments revealed that the superhydrophobic coating surface was almost free of bacterial adhesion, showing more than 98% antibacterial adhesion against both E. coli and S. aureus compared to hydroxyapatite coatings.