Step 1: Create an XML file, in this case applicationContext.xml
Step 2: Click Window → Prefences, enter the keyword cata, and click XML Catalog, as shown below
Step 3: Click Add to bring in the constraint package
My constraint package location is shown below:
After the derivation, it will look like the picture below. Finally, click OK
Step 3: Click on the newly created file applicationContext.xml and enter the file directory
Step 4: Click on the new file applicationContext.xml and select the Design mode in the lower left corner.
Step 5: Click on beans, right click Edit NameSpace, and enter
Step 6: Add xSI and click OK
Step 7: Introduce XSD constraints, as shown in the figure below
Step 8: Click Browse to pop up the interface shown below
Step 9: Select the Select XML Catalog entry, Select the package derived from step 2, and click OK.
Step 10: Name: Copy the Location Hint with the exception of the last /, as shown below
Note: in an XML file, only one constraint prefix can be allowed to be empty. In this case, if prefix can be beans, you need to insert the last/after Name into the constraint
Step 11: Click OK to check whether the constraints for the applicationContext.xml file are imported, as shown below
Step 12: If the import is successful, Alt + / will appear as follows