How to exclude a package from CDI scanning using @Vetoed annotation


Create a new Java file called package-info.java in the package you want to exclude. Then add the following code

@Vetoed
package org.shekhar.cdidemo.example;

import javax.enterprise.inject.Vetoed;

Discover more from Shekhar Gulati

Subscribe to get the latest posts sent to your email.

Leave a comment