# 70.2.1. 示例

本节包含三个使用`findmainclass`的示例。

**查找并记录**

```markup
<findmainclass classesroot="target/classes" />
```

**查找并设置**

```markup
<findmainclass classesroot="target/classes" property="main-class" />
```

**覆盖并设置**

```markup
<findmainclass mainclass="com.example.MainClass" property="main-class" />
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jack80342.gitbook.io/spring-boot/viii.-build-tool-plugins/70.-spring-boot-antlib-module/70.2.-spring-boot-findmainclass/70.2.1.-examples.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
