I would like to use the Java assert keyword in my Spring web application, primarily on my classes (checking invariants inside constructors), but I don't see how to enable runtime statement validation.
For a regular Java application, I would use the -ea switch with the java command, but I don't see how to do this with Tomcat, etc.
Is this the recommended thing, or should I use the "Assert" class from the Spring framework? However, I prefer my domain classes to be free of Spring dependencies.
source share