<dependencies> <dependency> <groupId>com.auto.common.libs</groupId> <artifactId>acl-core</artifactId> <version>1.0.0</version> </dependency> </dependencies> import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class MyClass { private static final Logger LOGGER = LogManager.getLogger(MyClass.class); public void doSomething() { } } import com.auto.common.libs.exception.ExceptionUtils; public class MyClass { public void doSomething() { try { } catch (Exception e) { ExceptionUtils.handleError(e); } } } import org.junit.Test; import static org.junit.Assert.assertEquals; public class MyTest { @Test public void testSomething() { MyClass myObj = new MyClass(); int result = myObj.doSomething(); assertEquals(10, result); } }


上一篇:
下一篇:
切换中文