Detect invalid Spring jndi-lookup element configuration

This rule flags the Spring jndi-lookup element in Spring configuration files when the following conditions are met.

This element is flagged in order to ensure that corresponding elements in the web.xml, WebSphere traditional and Liberty bindings files are properly configured.

This example Spring configuration will be flagged because the jndi-name value starts with java:comp/env/.

<jee:jndi-lookup id="myDataSource"
jndi-name="java:comp/env/jdbc/springdb"
proxy-interface="javax.sql.DataSource"/>

This rule has a quick fix in the source scanner. The quick fix will:

For additional information, see: