SELECT TO_CHAR(date_column,'YYYY-MM-DD HH24:MI:SS') FROM tablename
oracle sql : to_char 用例
转化24小时制
SELECT TO_CHAR(date_column,'YYYY-MM-DD HH24:MI:SS') FROM tablename
SomeClass someclass = mock(SomeClass.class,Mockito.RETURNS_DEEP_STUBS);2. Assert Any Exceptions 断言异常
assertThrows(RunTimeException.class, ()->{ //logic code });3. Mock private method私有方法
@InjectMocks PrivateInClass privateInClass; ReflectionTestUtils.invokeMethod(privateInClass, "privateMethodName", param1, param2, ...);4. Mock final class 将文件加入到如下路径
.../test/resources/mockkito-extensions/org.mockito.plugins.MockMakerMockMaker 文件内容
mock-maker-inline
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
documentBuilderFactory.setFeature("http://xml.org/sax/features/external-general-entities", false);
documentBuilderFactory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
documentBuilderFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
documentBuilderFactory.setXIncludeAware(false);
documentBuilderFactory.setExpandEntityReferences(false);
……
org.springframework.boot 2.2.1 version 下包含 tomcat 9.027 version
如果要在pom中升级tomcat到9.037版本,做如下修改
<tomcat-embed.version>9.0.37</tomcat-embed.version> <dependencyManagement> <dependencies> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-core</artifactId> <version>${tomcat-embed.version}</version> </dependency> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-el</artifactId> <version>${tomcat-embed.version}</version> </dependency> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-websocket</artifactId> <version>${tomcat-embed.version}</version> </dependency> </dependencies>
建议使用 Maven Helper plugin for Idea 观看