Restlet官方指南

article/2025/9/21 9:36:02

Restlet官方指南

Table of contents

  1. Restlet overview
  2. Retrieving the content of a Web page
  3. Listening to Web browsers
  4. Overview of a REST architecture
  5. Components, virtual hosts and applications
  6. Serving static files
  7. Access logging
  8. Displaying error pages
  9. Guarding access to sensitive resources
  10. URI rewriting, attribute extraction and redirection
  11. Routers and hierarchical URIs
  12. Reaching target Resources
  13. Conclusion

1. Restlet overview

The Restlet framework is composed of two main parts. First, there is the "Restlet API", a neutral API supporting the concepts of REST and facilitating the handling of calls for both client-side and server-side applications. This API is backed by the Restlet Engine and both are now shipped in a single JAR ("org.restlet.jar").

Framework structure

This separation between the API and the implementation is similar to the one between the Servlet API and Web containers like Jetty or Tomcat, or between the JDBC API and concrete JDBC drivers.

2. Retrieving the content of a Web page

As we mentioned in the introduction paper, the Restlet framework is at the same time a client and a server framework. For example, Restlet can easily work with remote resources using its HTTP client connector. A connector in REST is a software element that enables the communication between components, typically by implementing one side of a network protocol. Restlet provides several implementations of client connectors based on existing open-source projects. The connectors section lists all available client and server connectors and explain how to use and configure them.

Here we will get the representation of an existing resource and output it in the JVM console:

  1. // Outputting the content of a Web page  
  2. new ClientResource("http://restlet.org").get().write(System.out);  
  3.      

Note that the example above uses a simplified way to issue calls via the ClientResource class. If you need multi-threading or more control it is still possible to manipulate use the Client connector class or the Request objects directly. The example below how to set some preferences in your client call, like a referrer URI. It could also be the languages and media types you prefer to receive as a response:

  1. // Create the client resource  
  2. ClientResource resource = new ClientResource("http://restlet.org");  
  3.   
  4. // Customize the referrer property  
  5. resource.setReferrerRef("http://www.mysite.org");  
  6.   
  7. // Write the response entity on the console  
  8. resource.get().write(System.out);  
  9.      

3. Listening to Web browsers

Now, we want to see how the Restlet framework can listen to client requests and reply to them. We will use the internal Restlet HTTP server connector (even though it is possible to switch to others such as the one based on Mortbay's Jetty) and return a simple string representation "hello, world" as plain text. Note that the Part03 class extends the base ServerResource class provided by Restlet:

  1. public class Part03 extends ServerResource {  
  2.   
  3.     public static void main(String[] args) throws Exception {  
  4.         // Create the HTTP server and listen on port 8182  
  5.         new Server(Protocol.HTTP, 8182, Part03.class).start();  
  6.     }  
  7.   
  8.     @Get  
  9.     public String toString() {  
  10.         return "hello, world";  
  11.     }  
  12.   
  13. }  
  14.      

If you run this code and launch your server, you can open a Web browser and hit the http://localhost:8182. Actually, any URI will work, try also http://localhost:8182/test/tutorial. Note that if you test your server from a different machine, you need to replace "localhost" by either the IP address of your server or its domain name if it has one defined.

So far, we have mostly showed you the highest level of abstraction in the Restlet API, with the ClientResource and ServerResource classes. But as we move forward, you will discover that those two classes are supported by a rich API, letting you manipulate all the REST artifacts.

4. Overview of a REST architecture

Let's step back a little and consider typical web architectures from a REST point of view. In the diagram below, ports represent the connector that enables the communication between components which are represented by the larger boxes. The links represents the particular protocol (HTTP, SMTP, etc.) used for the actual communication.

REST architecture

Note that the same component can have any number of client and server connectors attached to it. Web Server B, for example, has both a server connector to respond to requests from the User Agent component, and client connectors to send requests to Web Server A and the Mail Server.

5. Components, virtual hosts and applications

In addition to supporting the standard REST software architecture elements as presented before, the Restlet framework also provides a set of classes that greatly simplify the hosting of multiple applications within a single JVM. The goal is to provide a RESTful, portable and more flexible alternative to the existing Servlet API. In the diagram below, we can see the three types of Restlets that are provided in order to manage these complex cases. Components can manage several Virtual Hosts and Applications.

Virtual Hosts support flexible configuration where, for example, the same IP address is shared by several domain names, or where the same domain name is load-balanced across several IP addresses. Finally, we use Applications to manage a set of related Restlets, Resources and Representations. In addition, Applications are ensured to be portable and reconfigurable over different Restlet implementations and with different virtual hosts. In addition, they provide important services like access logging, automatic decoding of request entities, configurable status page setting and more!

Restlet components, virtual hosts and applications

In order to illustrate these classes, let's examine a simple example. Here we create a Component, then add an HTTP server connector to it, listening on port 8182. Then we create a simple trace Restlet and attach it to the defaut VirtualHost of the Component. This default host is catching any request that wasn't already routed to a declared VirtualHost (see the Component.hosts property for details). In a later example, we will also introduce the usage of the Application class. Note that for now you don't see any access log displayed in the console.

  1. public static void main(String[] args) throws Exception {  
  2.     // Create a new Restlet component and add a HTTP server connector to it  
  3.     Component component = new Component();  
  4.     component.getServers().add(Protocol.HTTP, 8182);  
  5.   
  6.     // Then attach it to the local host  
  7.     component.getDefaultHost().attach("/trace", Part05.class);  
  8.   
  9.     // Now, let's start the component!  
  10.     // Note that the HTTP server connector is also automatically started.  
  11.     component.start();  
  12. }  
  13.   
  14. @Get  
  15. public String toString() {  
  16.     // Print the requested URI path  
  17.     return "Resource URI  : " + getReference() + '\n' + "Root URI      : "  
  18.             + getRootRef() + '\n' + "Routed part   : "  
  19.             + getReference().getBaseRef() + '\n' + "Remaining part: "  
  20.             + getReference().getRemainingPart();  
  21. }  
  22.      

Now let's test it by entering http://localhost:8182/trace/abc/def?param=123 in a Web browser. Here is the result that you will get:

Resource URI  : http://localhost:8182/trace/abc/def?param=123
Root URI      : http://localhost:8182/trace
Routed part   : http://localhost:8182/trace
Remaining part: /abc/def?param=123

6. Serving static files

Do you have a part of your web application that serves static pages like Javadocs? Well, no need to setup an Apache server just for that, use instead the dedicated Directory class. See how simple it is to use it:

  1. // URI of the root directory.  
  2. public static final String ROOT_URI = "file:///c:/restlet/docs/api/";  
  3.   
  4. [...]  
  5.   
  6. // Create a component  
  7. Component component = new Component();  
  8. component.getServers().add(Protocol.HTTP, 8182);  
  9. component.getClients().add(Protocol.FILE);  
  10.   
  11. // Create an application  
  12. Application application = new Application() {  
  13.     @Override  
  14.     public Restlet createInboundRoot() {  
  15.             return new Directory(getContext(), ROOT_URI);  
  16.     }  
  17. };  
  18.   
  19. // Attach the application to the component and start it  
  20. component.getDefaultHost().attach(application);  
  21. component.start();  
  22.      

In order to run this example, you need to specify a valid value for ROOT_URI, In this case, it is set to "file:///c:/restlet/docs/api/". Note that no additional configuration is needed. If you want to customize the mapping between file extensions and metadata (media type, language or encoding) or if you want to specify a different index name, you can use the Application's "metadataService" property.

7. Access logging

Being able to properly log the activity of a Web application is a common requirement. Restlet Components know by default how to generate Apache-like logs or even custom ones. By taking advantage of the logging facility built in the JDK, the logger can be configured like any standard JDK log to filter messages, reformat them or specify where to send them. Rotation of logs is also supported; see the java.util.loggingpackage for details.

Note that you can customize the logger name given to the java.util.logging framework by modifying the Component's "logService" property. In order to fully configure the logging, you need to declare a configuration file by setting a system property like:

  1. System.setProperty("java.util.logging.config.file",  
  2.         "/your/path/logging.config");  
  3.      

For details on the configuration file format, please check the JDK's LogManager class.

You can also have a look at the Restlet 2.0 logging documentation.

8. Displaying error pages

Another common requirement is the ability to customize the status pages returned when something didn't go as expected during the call handling. Maybe a resource was not found or an acceptable representation isn't available? In this case, or when any unhandled exception is be intercepted, the Application or the Component will automatically provide a default status page for you. This service is associated to the org.restlet.util.StatusService class, which is accessible as an Application and Component property called "statusService".

In order to customize the default messages, you will simply need to create a subclass of StatusService and override the getRepresentation(Status, Request, Response) method. Then just set an instance of your custom service to the appropriate "statusService" property.

9. Guarding access to sensitive resources

When you need to secure the access to some Restlets, several options are available. A common way is to rely on cookies to identify clients (or client sessions) and to check a given user ID or session ID against your application state to determine if access should be granted. Restlets natively support cookies via the Cookie and CookieSetting objects accessible from a Request or a Response.

There is another way based on the standard HTTP authentication mechanism. The Restlet Engine currently accepts credentials sent and received in the Basic HTTP scheme and also the credentials sent in the Amazon Web Services scheme.

When receiving a call, developers can use the parsed credentials available in Request.challengeResponse.identifier/secret via the ChallengeAuthenticator filter. Filters are specialized Restlets that can pre-process a call before invoking and attached Restlet or post-process a call after the attached Restlet returns it. If you are familiar with the Servlet API, the concept is similar to the Filter interface. See below how we would modify the previous example to secure the access to the Directory:

  1. // Create a simple password verifier  
  2. MapVerifier verifier = new MapVerifier();  
  3. verifier.getLocalSecrets().put("scott""tiger".toCharArray());  
  4.   
  5. // Create a Guard  
  6. ChallengeAuthenticator guard = new ChallengeAuthenticator(  
  7.                 getContext(), ChallengeScheme.HTTP_BASIC, "Tutorial");  
  8. guard.setVerifier(verifier);  
  9.   
  10. // Create a Directory able to return a deep hierarchy of files  
  11. Directory directory = new Directory(getContext(), ROOT_URI);  
  12. directory.setListingAllowed(true);  
  13. guard.setNext(directory);  
  14.   
  15. return guard;  
  16.      

Call handling flow

Note that the authentication and authorization decisions are clearly considered as distinct concerns and are fully customizable via dedicated filters that inherit from the Authenticator (such as ChallengeAuthenticator) and the Authorizer abstract classes. Here we simply hard-coded a single user and password couple. In order to test, let's use the client-side Restlet API:

  1. // Prepare the request  
  2. ClientResource resource = new ClientResource("http://localhost:8182/");  
  3.   
  4. // Add the client authentication to the call  
  5. ChallengeScheme scheme = ChallengeScheme.HTTP_BASIC;  
  6. ChallengeResponse authentication = new ChallengeResponse(scheme,  
  7.         "scott""tiger");  
  8. resource.setChallengeResponse(authentication);  
  9.   
  10. // Send the HTTP GET request  
  11. resource.get();  
  12.   
  13. if (resource.getStatus().isSuccess()) {  
  14.     // Output the response entity on the JVM console  
  15.     resource.getResponseEntity().write(System.out);  
  16. else if (resource.getStatus()  
  17.         .equals(Status.CLIENT_ERROR_UNAUTHORIZED)) {  
  18.     // Unauthorized access  
  19.     System.out  
  20.             .println("Access authorized by the server, check your credentials");  
  21. else {  
  22.     // Unexpected status  
  23.     System.out.println("An unexpected status was returned: "  
  24.             + resource.getStatus());  
  25. }  
  26.      

You can change the user ID or password sent by this test client in order to check the response returned by the server. Remember to launch the previous Restlet server before starting your client. Note that if you test your server from a different machine, you need to replace "localhost" by either the IP address of your server or its domain name when typing the URI in the browser. The server won't need any adjustment due to the usage of a VirtualHost which accepts all types of URIs by default.

10. URI rewriting and redirection

Another advantage of the Restlet framework is the built-in support for cool URIs. A good description of the importance of proper URI design is given by Jacob Nielsen in his AlertBox.

The first tool available is the Redirector, which allows the rewriting of a cool URI to another URI, followed by an automatic redirection. Several types of redirection are supported, the external redirection via the client/browser and the connector redirection for proxy-like behavior. In the example below, we will define a search service for our web site (named "mysite.org") based on Google. The "/search" relative URI identifies the search service, accepting some keywords via the "kwd" parameter:

  1. // Create a root router  
  2. Router router = new Router(getContext());  
  3.   
  4. // Create a Redirector to Google search service  
  5. String target = "http://www.google.com/search?q=site:mysite.org+{keywords}";  
  6. Redirector redirector = new Redirector(getContext(), target,  
  7.         Redirector.MODE_CLIENT_TEMPORARY);  
  8.   
  9. // While routing requests to the redirector, extract the "kwd" query  
  10. // parameter. For instance :  
  11. // http://localhost:8182/search?kwd=myKeyword1+myKeyword2  
  12. // will be routed to  
  13. // http://www.google.com/search?q=site:mysite.org+myKeyword1%20myKeyword2  
  14. Extractor extractor = new Extractor(getContext(), redirector);  
  15. extractor.extractQuery("keywords""kwd"true);  
  16.   
  17. // Attach the extractor to the router  
  18. router.attach("/search", extractor);  
  19.      

Note that the Redirector needs three parameters only. The first is the parent context, the second one defines how the URI rewriting should be done, based on a URI template. This template will be processed by the Template class. The third parameter defines the type of redirection; here we chose the client redirection, for simplicity purpose.

Also, we are relying on the Route class to extract the query parameter "kwd" from the initial request while the call is routed to the application. If the parameter is found, it is copied into the request attribute named "keywords", ready to be used by the Redirector when formatting its target URIs.

11. Routers and hierarchical URIs

In addition to the Redirector, we have another tool to manage cool URIs: Routers. They are specialized Restlets that can have other Restlets (Finders and Filters for example) attached to them and that can automatically delegate calls based on a URI template. In general, you will set a Router as the root of your Application.

Here we want to explain how to handle the following URI patterns:

  1. /docs/ to display static files
  2. /users/{user} to display a user account
  3. /users/{user}/orders to display the orders of a particular user
  4. /users/{user}/orders/{order} to display a specific order

The fact that these URIs contain variable parts (between accolades) and that no file extension is used makes it harder to handle them in a typical Web container. Here, you just need to attach target Restlets to a Router using the URI template. At runtime, the route that best matches the request URI will received the call and be able to invoke its attached Restlet. At the same time, the request's attributes map will be automatically updated with the value of the URI template variables!

Call handling flow

See the implementation code below. In a real application, you will probably want to create separate subclasses instead of the anonymous ones we use here:

  1. // Create a root router  
  2. Router router = new Router(getContext());  
  3.   
  4. // Attach a guard to secure access to the directory  
  5. Guard guard = new Guard(getContext(), ChallengeScheme.HTTP_BASIC,  
  6.         "Restlet tutorial");  
  7. guard.getSecrets().put("scott""tiger".toCharArray());  
  8. router.attach("/docs/", guard);  
  9.   
  10. // Create a directory able to expose a hierarchy of files  
  11. Directory directory = new Directory(getContext(), ROOT_URI);  
  12. guard.setNext(directory);  
  13.   
  14. // Create the account handler  
  15. Restlet account = new Restlet() {  
  16.     @Override  
  17.     public void handle(Request request, Response response) {  
  18.         // Print the requested URI path  
  19.         String message = "Account of user \""  
  20.                 + request.getAttributes().get("user") + "\"";  
  21.         response.setEntity(message, MediaType.TEXT_PLAIN);  
  22.     }  
  23. };  
  24.   
  25. // Create the orders handler  
  26. Restlet orders = new Restlet(getContext()) {  
  27.     @Override  
  28.     public void handle(Request request, Response response) {  
  29.         // Print the user name of the requested orders  
  30.         String message = "Orders of user \""  
  31.                 + request.getAttributes().get("user") + "\"";  
  32.         response.setEntity(message, MediaType.TEXT_PLAIN);  
  33.     }  
  34. };  
  35.   
  36. // Create the order handler  
  37. Restlet order = new Restlet(getContext()) {  
  38.     @Override  
  39.     public void handle(Request request, Response response) {  
  40.         // Print the user name of the requested orders  
  41.         String message = "Order \""  
  42.                 + request.getAttributes().get("order")  
  43.                 + "\" for user \""  
  44.                 + request.getAttributes().get("user") + "\"";  
  45.         response.setEntity(message, MediaType.TEXT_PLAIN);  
  46.     }  
  47. };  
  48.   
  49. // Attach the handlers to the root router  
  50. router.attach("/users/{user}", account);  
  51. router.attach("/users/{user}/orders", orders);  
  52. router.attach("/users/{user}/orders/{order}", order);  
  53.      

Note that the routing assumes that your request contains an absolute target URI that identifies a target resource. During the request processing the resource's base URI is continuously updated, for each level in the hierarchy of routers. This explains why the default behavior of routers is to match only the beginning of the remaining URI part and not the totality of it. In some cases, you might want to change this default mode, and this is easy to do via the "defaultMatchingMode" property on Router, or by modifying the "matchingMode" property of the template associated with the route created by the Router.attach() methods. For the modes, you can use the Template.MODE_EQUALS or Template.MODE_STARTS_WITH constants.

Please note that the values of the variables are directly extracted from the URI and are therefore not percent-decoded. In order to achieve such a task, have a look to the Reference#decode(String) method.

12. Reaching target Resources

In the previous example, we took advantage of the flexible routing features of the framework to route the requests while extracting interesting parts from the target URI. But, we didn't pay attention to the request method, nor to the client preferences regarding the response that he expects. Also, how do we connect our Restlet resources with the backend systems, the domain objects?

So far, we introduced features that go beyond the traditional Servlet API and introduced our support for REST that justify our Restlet name! If haven't done so already, you can learn more about the REST architecture style and the best practices to follow when applying it to a Web application. There is a related FAQ entry that will give you some starting pointers and we also maintain a REST search engine (based on Google) that can be useful. If you have some experience with a traditional MVC framework, you can read more about the relationship to Restlets in this other FAQ entry.

To summarize, a request contains an URI that identifies the target resource that is the subject of the call. This information is stored in the Request.resourceRef property and serves as the basis of the routing as we saw. So the first goal when handling a request is to find the target resource which is in the framework... an instance of the ServerResource class or more precisely one of its subclasses. To help us in this task, we can use the dedicated Finder, a subclass of Restlet, which takes a ServerResource class reference as an argument and which will automatically instantiate it when a request comes in. The resource will dynamically dispatch the call to either a matching annotated method or to a predefined method (get(), post(), put(), delete(), etc.). Of course, this behavior can be customized. There is even an attach() method on Router that can take two arguments, an URI template and a ServerResource class and that transparently creates the Finder for you. Now, let's have a look at this overall diagram, showing the relationship between the main framework classes involved in this example:

Component diagram

Back to the code, here is our refactored Application.createRoot() method. For simplicity purpose, we didn't keep the Directory serving static files as this part wouldn't change. You can notice the way that resource classes are directly attached to the router.

  1. // Create a router  
  2. Router router = new Router(getContext());  
  3.   
  4. // Attach the resources to the router  
  5. router.attach("/users/{user}", UserResource.class);  
  6. router.attach("/users/{user}/orders", OrdersResource.class);  
  7. router.attach("/users/{user}/orders/{order}", OrderResource.class);  
  8.      

We will finally review one of the resource classes, the UserResource class. This class derives from org.restlet.resource.ServerResource. We override the init() method to retrieve the attribute "user" that is automatically extracted from the "/users/{user}" URI template and store its value in a convenient member variable. At this point, in a full application, we would lookup our associated "user" domain object. Finally, we declare a toString() method that supports the GET method as indicated by the @Get annotation.

  1. public class UserResource extends ServerResource {  
  2.     String userName;  
  3.   
  4.     Object user;  
  5.   
  6.     @Override  
  7.     public void init() {  
  8.         this.userName = (String) getRequestAttributes().get("user");  
  9.         this.user = null// Could be a lookup to a domain object.  
  10.     }  
  11.   
  12.     @Get  
  13.     public String toString() {  
  14.         return "Account of user \"" + this.userName + "\"";  
  15.     }  
  16. }  
  17.      

You can have a look at the rest of the code in the tutorial package and test the application. You will obtain the same behavior as in Part11, with the difference that only GET requests will be accepted. If you want to enable PUT for example, you have to create a Java method in UserResource and annotate it with @Put. You can check the Javadocs for further details.

Conclusion

We have already covered many aspects of the framework. Before you move on by yourself, let's take a step back and look at two hierarchy diagrams showing the main concepts covered in this tutorial and their relationships:

Restlet hierarchy

Now, here is the hierarchy with the core Representation classes:

Resource and Representation hierarchy

Beside this tutorial, your best source of information will be the Javadocs available for the Restlet API, the Restlet Extensions and the Restlet. Have also a look at the connectors section that lists all available client and server connectors and explain how to use and configure them, and the integrations section for a list of all available extensions providing pluggable features such as integration with servlet containers, generation of dynamic representations, etc. You can also post your questions and help others in our discussion list.

Notes
  • We encourage you to run the examples. The full source code is available in the latest release.
  • Thanks to Jean-Paul Figer, Christian Jensen, Jim Ancona, Roger Menday, John D. Mitchell, Jérôme Bernard, Dave Pawson, Peter Murray, Alex Combs and Leonardo Maranhão for the feed-back on this tutorial.
  • A Chinese translation is available via the Matrix.org.cn site.


http://chatgpt.dhexx.cn/article/OwjPlH1K.shtml

相关文章

谷歌安装Restlet Client插件

目录 一、Restlet Client插件下载链接二、Restlet Client插件安装步骤 一、Restlet Client插件下载链接 链接: https://pan.baidu.com/s/15rWwbQv6KlTS_T6tcpT_YA 提取码:6mxp 二、Restlet Client插件安装步骤 1、下载完Restlet-Client-v2.8.0.1.zip压…

Restlet指南

cleverpig 发表于 2007-11-30 15:15:48 作者:cleverpig 来源:Matrix 评论数:1 点击数:13,237 投票总得分:5 投票总人次:1 关键字:Restlet,REST,指南,入门 摘要: 当复杂核心化模式日趋强大之时,面向对象设计范例已经不总是Web开发中的最佳选择&#xff0c…

Restlet 学习笔记

摘要:网络上对 restlet 的评判褒贬不一,有的说框架封装的很好,很有弹性,有的说 rest 架构风格本身是一种简单的风格,restlet 过设计以使编程过于复杂,其实我倒不觉得 restlet 有什么复杂,相反很…

Restlet实战(一)Restlet入门资料及概念

先贴上几个本人认为比较有价值,值得初学者一看的文章。 http://www.matrix.org.cn/resource/article/2007-11-30/1312be72-9f14-11dc-bd16-451eadcf4db4.html http://blog.sina.com.cn/s/blog_537c5aab010096v8.html~typev5_one&labelrela_nextarticle http://…

Restlet 2.3 指南

2019独角兽企业重金招聘Python工程师标准>>> #Restlet 2.3 指南 #1. Restlet概述 Restlet框架由两个主要部分构成。首先,一部分是"Restlet API",是一个中立的,支持REST概念,并能促进客户端、服务器端应用程序…

minio用法

1 Minio是在Apache License v2.0下发布的对象存储服务器。它与Amazon S3云存储服务兼容。 它最适合存储非结构化数据,如照片,视频,日志文件,备份和容器/ VM映像。对象的大小可以从几KB到最大5TB。 Minio服务器足够轻&#xff0c…

minio使用

一、介绍 开源协议的对象存储服务,轻量,性能强 二、安装 windows版链接: https://pan.baidu.com/s/1vv2p8bZBeZFG9cpIhDLVXQ?pwds5dd 提取码: s5dd 下载后创建minioData文件用于储存文件 创建run.bat脚本,内容如下 # 设置用户名 set MINIO_ROOT_USERadmin # …

CentOS Minimal 和 NetInstall 版本区别

Index of /centos/7.9.2009/isos/x86_64/ 如图: BinDVD版——就是普通安装版,需安装到计算机硬盘才能用,bin一般都比较大,而且包含大量的常用软件,安装时无需再在线下载(大部分情况)。 minim…

简易最小化虚拟机安装配置(CentOS-7-Minimal)

文章目录 镜像选择虚拟机安装(VMware Workstation)虚拟网络配置(NAT模式)虚拟网卡配置 虚拟机配置静态IP配置及测试系统初始化及库安装停止防火墙 & 关闭防火墙自启动关闭 selinux 防火墙更换镜像源并重建镜像源缓存安装 ifco…

pr双击打开图标没反应,下载ZXPSignLib-minimal.dll替换

微智启今天安装了pr cc2018,双击打开图标无反应 于是又试了Premiere cc2019,还是没反应 桌面还多出一些白色文件图标.crash结尾的 解决方案: 下载ZXPSignLib-minimal.dll文件,微智启软件工作室放到pr安装目录的根目录&#xff…

Minimal Square

文章目录 一、A. Minimal Square总结 一、A. Minimal Square 本题链接:A. Minimal Square 题目: A. Minimal Square time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Find the minimu…

出现minimal bash-like...的问题如何解决?

2021.9.4写下此文,以备查阅。 问题如图: 一般出现这个界面即为引导程序出现问题,根据下面两种情况看待: 卸载双系统之一(比如之前是windeepin双系统,现在卸载了deepin系统)重启时出现。安装新…

Centos教程,DVD、Everything、Minimal、NetInstall区别

今天给大家讲述一下在官网下载Linux中Centos7的时候遇到的版本问题。首先给大家简述一下Centos下载流程。 1.百度搜索Centos,点击官网。 2.点击Download,选择Centos7(举例)。 3.然后这里我们选择aliyun下载。 4.选择第一个镜像版本…

【已解决】grub引导项修复:Minimal BASH-like line editing is supported.

目录 1 问题背景2 问题探索3 问题解决4 告别Bug 1 问题背景 环境: Win10Ubuntu20.04 现象:双系统电脑向移动硬盘安装Ubuntu系统后,重启黑屏并显示Minimal BASH-like line editing is supported. For the first word, TAB lists possible comm…

Centos7 Minimal 版本基本配置记录

每次搭测试环境之前都需要先装一台干净的虚拟机,然而 Centos7 Minimal 版本快速装完之后还需要配置:网络、国内源、一些基础工具(net-tools、vim)等才能远程连接和使用。记录一下,方便下次快速配置使用。 目录 1、网…

详解Minimal Web API的使用

一、简介 “Minimal API 是为了创建具有最小依赖关系的 HTTP API”,这是官方的解释。什么意思呢,创建一个 API 并不需要加载许多的依赖。平时在开发 ASP.NET Core Web API 时,通常需要创建 Controller 来定义我们的 API 这种方式&#xff0c…

实例分割------Yolact-minimal结构详解

yolact结构图 网络backbone可以采用resnet101,resnet50甚至vgg16等。然后有3个分支,1个分支输出目标位置,1个分支输出mask系数,1个分类的置信率,所以决定目标的有4(位置)+k(mask系数)+c(分类置信率)个参数。 检测的大致步骤为: 1.从backbone中取出C3,C4,C5; 2.通…

VMware16安装CentOS 7.9操作系统(Minimal版)

记录:299 场景:使用VMware16安装CentOS 7.9操作系统。 基础环境: 虚拟机:VMware16 操作系统:CentOS 7.9 镜像包:CentOS-7-x86_64-DVD-2009.iso 镜像下载地址: 阿里地址:https…

ISO文件boot、dvd、minimal的区别

在centos的下载中,有分为boot、dvd、minimal的iso文件,那么他们之间有什么区别呢? boot.iso 这个版本大小不会超过1G ,只有最基本的启动引导等内容,各类包均需从线上下载,需要快速安装且有可靠网络的前提下&#xff0c…

【minimal problem】资料整理

minimal problem use as few data as to generate a system of algebraic equaIons with a finite number of soluIons 使用尽可能少的数据来生成代数系统 解数有限的方程 以往工作 基于神经网络解一元高次方程 代码实战:解低次方程 代码实战:解高次方…