mvn -Dspring.config.location=src/main/resources/application.properties spring-boot:run
java -jar target/example.basic-properties.jar --spring.config.location=file:///home/$(whoami)/Desktop/application.properties
file://<путь>
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathFactory;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
public class Eval {
public static void main(String[] args) throws Exception {
XPathFactory xPathFactory = XPathFactory.newInstance();
XPath xPath = xPathFactory.newXPath();
InputSource doc = new InputSource(new InputStreamReader(
new FileInputStream(new File("file.xml"))));
String expression = "//ROW/COLUMN[@NAME='STOREDATE']";
XPathExpression xPathExpression = xPath.compile(expression);
NodeList elem1List = (NodeList) xPathExpression.evaluate(doc,
XPathConstants.NODESET);
xPathExpression = xPath.compile("text()");
for (int i = 0; i < elem1List.getLength(); i++) {
System.out.println(xPathExpression.evaluate(elem1List.item(i),
XPathConstants.STRING));
}
}
}
javac Eval.java
java Eval
10.10.19
testngxmlfiles\testng-results.xml
забытом языке исчезнувшей цивилизации junit4.