IDEA ServletContextListener does not prompt to implement abstract methods

Since default is used in the interface as a modifier, and the method body is empty (with curly braces), it will not prompt the familiar red underline to quickly implement the abstract method in the interface.
Insert picture description here
If you don’t want to manually enter, or copy and paste and then modify the modifier, you can

  1. Right click to find Generate or directly alt+insert
    Insert picture description here

  2. Choose Override Methods
    Insert picture description here

3. Select two in the picture
Insert picture description here
4. Click OK to complete the operation

Guess you like

Origin blog.csdn.net/interestANd/article/details/113084756