`
文章列表
Maven的设计是基于生命周期的。每一个生命周期有多个阶段组成,每个阶段的执行都依赖上一个阶段,也就是说执行某个阶段之前必须执行完在这个阶段之前的其他阶段。   Maven有3个生命周期模型。并且有些阶段会绑定一些目标(goal)   1.   默认周期 阶段名称 阶段描述 绑定目标 (goal)
  package process; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; public class ProcessExecutor { public static void execute(String command)throws Exception{ Process process = Runtime.getRuntime().exec(command); // the exit value int ...
1. 创建pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVer ...
1. Download the maven. (version 3.2.1) 2. Configure the maven bin path in system path.         3.Check whether the maven is installed successfully using [mvn –v] in dos           4. Execute below command. mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifa ...
 1. 创建 keystore 文件   执行 keytool -genkey -alias tomcat -keyalg RSA   这样就在用户主目录下创建了keystore 文件   2. 在tomcat 中找到server.xml. 并找到如下配置。 <!-- <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme ...
     1. SampleDecider.java package sample; import org.apache.log4j.Logger; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.StepExecution; import org.springframework.batch.core.job.flow.FlowExecut ...
package io; import java.io.RandomAccessFile; public class RandomAccessFileTest { public static void main(String[] args)throws Exception { printFileInReverseOrder(); } private static void printFileInReverseOrder()throws Exception{ RandomAccessFile randomAccessFile = new Rand ...
package io; import java.io.FileReader; import java.io.LineNumberReader; public class LineNumberReaderTest { public static void main(String[] args) throws Exception{ int lineNumber = getFileLineNumber("D:/Projects/JDK/src/io/info.txt"); System.out.println("the line n ...
1. Person.java package pojo; public class Person { private String id; private String name; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.n ...
1.POJO  Employee.java package pojo; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name="T_EMPLOYEE") public class Employee { @Id private String id; private String name; private double salary; ...
SAAJ(SOAP with Attachments API for Java) 是在松散耦合软件系统中基于SOAP协议利用XML传递消息的API规.   简单案例 发送SOAP工具类util.SOAPUtil.java package util; import javax.xml.soap.MessageFactory; import javax.xml.soap.SOAPBody; import javax.xml.soap.SOAPConnection; import javax.xml.soap.SOAPConnectionFactory; import javax ...
EclipseLink MOXy的JAXB实现可以定制生成的XML文件。   一  如何使用 EclipseLink的 MOXy的JAXB特性 1) 引入 org.eclipse.persistence.moxy_2.3.1.v20110908-r10021.jar,org.eclipse.persistence.core.jar或者eclipselink.jar 2) 创建jaxb.properties javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory  将其放在模型对象 ...
JQuery源码如下 // Define a local copy of jQuery jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); } jQuery.fn = jQuery.prototype = {    ... init: function( selector, ...
一 什么是JAAS Java 认证和授权服务”(Java Authentication and Authorization Service,JAAS)是对 Java 2 SDK 的扩展。 JAAS 可分Authentication和Authorization 。 1)  Authentication:认证用户身份。看哪个用户在执行代码。通俗的来说就是哪个用户在执行操作。这个操作可能在某个application或bean或servlet上. 2) Authorization : 授权用户操作。也就是验证用户是否对指定资源有特定访问权限。好比某一用户是否有对指定文件的读取权限。   ...
Person.java package com; import java.util.Date; public class Person { private String id; private String name; private Date birthday; public Person(){} public Person(String id,String name, Date birthday) { this.id=id; this.name = name; this.birthday = birthday; } pub ...
Global site tag (gtag.js) - Google Analytics