Steps:
- design API(RAML or Swagger)
- using ApiSpark platform to generate Java code and angularJs code
- add your logic
Steps:
| <!DOCTYPE html> | |
| <html ng-app="myapp"> | |
| <head> | |
| <title>AngularJS: UI-Router Quick Start</title> | |
| <!-- Bootstrap CSS --> | |
| <link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.1/css/bootstrap.min.css" rel="stylesheet"> | |
| </head> | |
| <body class="container"> |
1.The primary key is a general concept to indicate one or more columns used to retrieve data from a Table.
SIMPLEcreate table stackoverflow (
key text PRIMARY KEY,
data text
);generate a project
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
The HTTP methods PATCH can be used to update partial resources. For instance, when you only need to update one field of the resource, PUTting a complete resource representation might be cumbersome and utilizes more bandwidth
PATCH /user/jthijssen HTTP/1.1
<user>
<firstname>Joshua</firstname>
</user>
Also, the PUT method is idempotent. PUTting the same data multiple times to the same resource, should not result in different resources, while POSTing to the same resource can result in the creation of multiple resources.
private static byte[] loadImage() {
URL url = Thread.currentThread().getContextClassLoader().getResource("photo.png");
try {
return Files.readAllBytes(Paths.get(url.toURI()));
} catch (Exception e) {
throw new RuntimeException("Can not load the image");
}
}the principle of a program reading data from a source and writing it to some destination: Source -> Program -> Destination
The most typical sources and destinations of data are these: