Skip to content

Commit

Permalink
chore: deploy docs of project Nop Entropy via GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nop-cao committed Sep 16, 2024
1 parent 1360a9f commit 5476420
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1261,9 +1261,17 @@ <h1 class="Article-title">原生编译</h1>
<figure class="highlight yaml"><table><tr><td class="code"><pre><code class="hljs yaml"><span class="hljs-attr">nop:</span><br> <span class="hljs-attr">profile:</span> <span class="hljs-string">dev</span><br><br><span class="hljs-string">&quot;%dev&quot;</span><span class="hljs-string">:</span><br> <span class="hljs-attr">nop.codegen.trace.enabled:</span> <span class="hljs-literal">true</span><br></code></pre></td></tr></table></figure>
<p>在调试阶段启用应用,并进行业务操作,用到的反射类会在关闭应用时输出到<code>reflect-config.json</code>文件中。<br>此外,还会自动生成<code>nop-vfs-index.txt</code>文件,其中包含了所有虚拟文件系统中的文件路径。Graalvm不支持类扫描和资源文件扫描,如果没有索引文件帮助,则无法实现文件遍历和查找。</p>
<h2 id="第三方库适配"><a href="#第三方库适配" class="headerlink" title="第三方库适配"></a>第三方库适配</h2><p>在nop-commons, nop-auth-core等模块中,对于用到的第三方库如caffeine,jsonwebtoken等增加了<code>reflect-config.json</code>配置</p>
<h2 id="版本兼容性"><a href="#版本兼容性" class="headerlink" title="版本兼容性"></a>版本兼容性</h2><p>Truffle languages and other components version 23.1.2 are designed for use with GraalVM for JDK 21.0.2</p>
<h2 id="版本兼容性"><a href="#版本兼容性" class="headerlink" title="版本兼容性"></a>版本兼容性</h2><p><a target="_blank" rel="noopener" href="https://www.graalvm.org/release-notes/JDK_21/">https://www.graalvm.org/release-notes/JDK_21/</a></p>
<p><a target="_blank" rel="noopener" href="https://github.com/graalvm/graalvm-ce-builds/releases">https://github.com/graalvm/graalvm-ce-builds/releases</a> 下载graalvm 21.0.2</p>
<p><code>quarkus-bom</code>模块的pom文件中定义了quarkus所依赖的graalvm js的版本,然后再在上面的releases页面查找对应graalvm的版本。</p>
<p>Truffle languages and other components version 23.1.2 are designed for use with GraalVM for JDK 21.0.2</p>
<p>GraalJS version 24.0.2 is designed for use with Oracle GraalVM for JDK 22.0.2 or GraalVM Community Edition for JDK 22.0.2,</p>
<p>GraalJS version 23.1.2 is designed for use with Oracle GraalVM for JDK 21.0.2 or GraalVM Community Edition for JDK 21.0.2,</p>
<h2 id="类初始化"><a href="#类初始化" class="headerlink" title="类初始化"></a>类初始化</h2><h2 id="reflect-config-json"><a href="#reflect-config-json" class="headerlink" title="reflect-config.json"></a>reflect-config.json</h2><p>会自动收集如下目录中的配置 <code>src/main/resources/META-INF/native-image/&lt;group-id&gt;/&lt;artifact-id&gt;</code></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><code class="hljs plaintext">[<br> &#123;<br> &quot;name&quot; : &quot;com.acme.MyClass&quot;,<br> &quot;allDeclaredConstructors&quot; : true,<br> &quot;allPublicConstructors&quot; : true,<br> &quot;allDeclaredMethods&quot; : true,<br> &quot;allPublicMethods&quot; : true,<br> &quot;allDeclaredFields&quot; : true,<br> &quot;allPublicFields&quot; : true<br> &#125;<br>]<br></code></pre></td></tr></table></figure>

<h2 id="配置说明"><a href="#配置说明" class="headerlink" title="配置说明"></a>配置说明</h2><p>指定以下选项以分别启用基于 Chrome DevTools 调试器、采样探查器、跟踪探查器和内存分析器的调试器:</p>
<p>–inspect<br>–cpusampler<br>–cputracer<br>–memsampler</p>
<h2 id="Solon框架"><a href="#Solon框架" class="headerlink" title="Solon框架"></a>Solon框架</h2><h3 id="1-在pom文件中引入aot支持,引入solon-logging-logback依赖,"><a href="#1-在pom文件中引入aot支持,引入solon-logging-logback依赖," class="headerlink" title="1. 在pom文件中引入aot支持,引入solon-logging-logback依赖,"></a>1. 在pom文件中引入aot支持,引入solon-logging-logback依赖,</h3><figure class="highlight xml"><table><tr><td class="code"><pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">project</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">dependencies</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.noear<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>solon.aot<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span><br><br> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.noear<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>solon.logging.logback<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">dependencies</span>&gt;</span><br><br> <span class="hljs-tag">&lt;<span class="hljs-name">build</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">plugins</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">plugin</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.noear<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>solon-maven-plugin<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>$&#123;solon.version&#125;<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">executions</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">execution</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">phase</span>&gt;</span>package<span class="hljs-tag">&lt;/<span class="hljs-name">phase</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">goals</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">goal</span>&gt;</span>repackage<span class="hljs-tag">&lt;/<span class="hljs-name">goal</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">goals</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">execution</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">executions</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">plugin</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">plugins</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">build</span>&gt;</span><br><br> <span class="hljs-tag">&lt;<span class="hljs-name">profiles</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">profile</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">id</span>&gt;</span>native<span class="hljs-tag">&lt;/<span class="hljs-name">id</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">build</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">plugins</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">plugin</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.noear<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>solon-maven-plugin<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>$&#123;solon.version&#125;<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">executions</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">execution</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">id</span>&gt;</span>process-aot<span class="hljs-tag">&lt;/<span class="hljs-name">id</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">goals</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">goal</span>&gt;</span>process-aot<span class="hljs-tag">&lt;/<span class="hljs-name">goal</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">goals</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">execution</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">executions</span>&gt;</span><br><br> <span class="hljs-tag">&lt;<span class="hljs-name">dependencies</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.codehaus.plexus<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>plexus-utils<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>3.5.1<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">dependencies</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">plugin</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">plugin</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.graalvm.buildtools<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>native-maven-plugin<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>0.9.28<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span><br> <span class="hljs-comment">&lt;!-- 使用graalvm提供的可达性元数据,很多第三方库就直接可以构建成可执行文件了 --&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">configuration</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">metadataRepository</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">enabled</span>&gt;</span>true<span class="hljs-tag">&lt;/<span class="hljs-name">enabled</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">metadataRepository</span>&gt;</span><br> <span class="hljs-comment">&lt;!-- &lt;buildArgs combine.children=&quot;append&quot;&gt;--&gt;</span><br> <span class="hljs-comment">&lt;!-- &lt;buildArg&gt;-H:+AddAllCharsets&lt;/buildArg&gt;--&gt;</span><br> <span class="hljs-comment">&lt;!-- &lt;/buildArgs&gt;--&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">configuration</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">executions</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">execution</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">id</span>&gt;</span>add-reachability-metadata<span class="hljs-tag">&lt;/<span class="hljs-name">id</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">goals</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">goal</span>&gt;</span>add-reachability-metadata<span class="hljs-tag">&lt;/<span class="hljs-name">goal</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">goals</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">execution</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">executions</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">plugin</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">plugins</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">build</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">profile</span>&gt;</span><br> <span class="hljs-tag">&lt;/<span class="hljs-name">profiles</span>&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">project</span>&gt;</span><br></code></pre></td></tr></table></figure>

<h3 id="2-在app-yml中配置logback。使用logback-xml配置时缺少反射支持,无法正常输入日志"><a href="#2-在app-yml中配置logback。使用logback-xml配置时缺少反射支持,无法正常输入日志" class="headerlink" title="2. 在app.yml中配置logback。使用logback.xml配置时缺少反射支持,无法正常输入日志"></a>2. 在app.yml中配置logback。使用logback.xml配置时缺少反射支持,无法正常输入日志</h3><figure class="highlight yaml"><table><tr><td class="code"><pre><code class="hljs yaml"><span class="hljs-attr">solon.logging.appender:</span><br> <span class="hljs-attr">console:</span><br> <span class="hljs-attr">level:</span> <span class="hljs-string">DEBUG</span> <span class="hljs-comment">#可根据需要调整级别</span><br> <span class="hljs-attr">enable:</span> <span class="hljs-literal">true</span> <span class="hljs-comment">#是否启用</span><br> <span class="hljs-attr">cloud:</span><br> <span class="hljs-attr">level:</span> <span class="hljs-string">INFO</span><br> <span class="hljs-attr">enable:</span> <span class="hljs-literal">true</span><br><br><br><span class="hljs-attr">solon.logging.logger:</span><br> <span class="hljs-attr">&quot;root&quot;:</span> <span class="hljs-comment">#默认记录器配置</span><br> <span class="hljs-attr">level:</span> <span class="hljs-string">DEBUG</span><br> <span class="hljs-attr">&quot;com.zaxxer.hikari&quot;:</span><br> <span class="hljs-attr">level:</span> <span class="hljs-string">WARN</span><br></code></pre></td></tr></table></figure>
Expand Down
8 changes: 4 additions & 4 deletions projects/nop-entropy/docs/dev-guide/graphql/crud/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1258,14 +1258,14 @@ <h1 class="Article-title">标准增删改查操作</h1>

</header>
<div class="Article-content col-md-9"><p>CrudBizModel提供了标准的增删改查操作,以NopAuthUser为例:</p>
<h2 id="新增"><a href="#新增" class="headerlink" title="新增"></a>新增</h2><figure class="highlight plaintext"><table><tr><td class="code"><pre><code class="hljs plaintext"><br>POST /r/NopAuthUser__save?@selection=name,status<br><br>&#123;<br> &quot;data&quot;: &#123;<br> 字段名:字段值<br> &#125;<br>&#125;<br><br><br>mutation&#123;<br> NopAuthUser__save(data: Map)&#123;<br> name<br> status<br> &#125;<br>&#125;<br></code></pre></td></tr></table></figure>
<h2 id="新增"><a href="#新增" class="headerlink" title="新增"></a>新增</h2><figure class="highlight plaintext"><table><tr><td class="code"><pre><code class="hljs plaintext"><br>POST /r/NopAuthUser__save?@selection=name,status<br><br>&#123;<br> &quot;data&quot;: &#123;<br> 字段名:字段值<br> &#125;<br>&#125;<br><br><br>mutation&#123;<br> NopAuthUser__save(data: $data)&#123;<br> name<br> status<br> &#125;<br>&#125;<br></code></pre></td></tr></table></figure>

<h2 id="修改"><a href="#修改" class="headerlink" title="修改"></a>修改</h2><figure class="highlight plaintext"><table><tr><td class="code"><pre><code class="hljs plaintext"><br>POST /r/NopAuthUser__update?@selection=name,status<br><br>&#123;<br> &quot;data&quot;: &#123;<br> id: 主键值<br> 字段名:字段值<br> &#125;<br>&#125;<br><br><br>mutation&#123;<br> NopAuthUser__update(data: Map)&#123;<br> name<br> status<br> &#125;<br>&#125;<br></code></pre></td></tr></table></figure>
<h2 id="修改"><a href="#修改" class="headerlink" title="修改"></a>修改</h2><figure class="highlight plaintext"><table><tr><td class="code"><pre><code class="hljs plaintext"><br>POST /r/NopAuthUser__update?@selection=name,status<br><br>&#123;<br> &quot;data&quot;: &#123;<br> id: 主键值<br> 字段名:字段值<br> &#125;<br>&#125;<br><br><br>mutation&#123;<br> NopAuthUser__update(data: $data)&#123;<br> name<br> status<br> &#125;<br>&#125;<br></code></pre></td></tr></table></figure>

<h2 id="保存或者修改"><a href="#保存或者修改" class="headerlink" title="保存或者修改"></a>保存或者修改</h2><p>如果提交的data中包含主键,则认为是修改,否则是新建。</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><code class="hljs plaintext"><br>POST /r/NopAuthUser__save_update?@selection=name,status<br><br>&#123;<br> &quot;data&quot;: &#123;<br> id: 主键值<br> 字段名:字段值<br> &#125;<br>&#125;<br><br><br>mutation&#123;<br> NopAuthUser__save_update(data: Map)&#123;<br> name<br> status<br> &#125;<br>&#125;<br></code></pre></td></tr></table></figure>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><code class="hljs plaintext"><br>POST /r/NopAuthUser__save_update?@selection=name,status<br><br>&#123;<br> &quot;data&quot;: &#123;<br> id: 主键值<br> 字段名:字段值<br> &#125;<br>&#125;<br><br><br>mutation&#123;<br> NopAuthUser__save_update(data: $data)&#123;<br> name<br> status<br> &#125;<br>&#125;<br></code></pre></td></tr></table></figure>

<h2 id="删除"><a href="#删除" class="headerlink" title="删除"></a>删除</h2><figure class="highlight plaintext"><table><tr><td class="code"><pre><code class="hljs plaintext"><br>POST /r/NopAuthUser__delete?@selection=name,status<br><br>&#123;<br> &quot;id”: 主键<br>&#125;<br><br><br>mutation&#123;<br> NopAuthUser__delete(id: 主键)&#123;<br> name<br> status<br> &#125;<br>&#125;<br></code></pre></td></tr></table></figure>
<h2 id="删除"><a href="#删除" class="headerlink" title="删除"></a>删除</h2><figure class="highlight plaintext"><table><tr><td class="code"><pre><code class="hljs plaintext"><br>POST /r/NopAuthUser__delete?@selection=name,status<br><br>&#123;<br> &quot;id&quot;: &quot;主键&quot;<br>&#125;<br><br><br>mutation&#123;<br> NopAuthUser__delete(id: &quot;主键&quot;)&#123;<br> name<br> status<br> &#125;<br>&#125;<br></code></pre></td></tr></table></figure>

<h2 id="批量删除"><a href="#批量删除" class="headerlink" title="批量删除"></a>批量删除</h2><figure class="highlight plaintext"><table><tr><td class="code"><pre><code class="hljs plaintext"><br>POST /r/NopAuthUser__bathDelete?@selection=name,status<br><br>&#123;<br> &quot;ids”: [ &quot;1&quot;,&quot;2&quot;,&quot;3&quot;]<br>&#125;<br><br><br>mutation&#123;<br> NopAuthUser__batchDelete(ids: $ids)&#123;<br> name<br> status<br> &#125;<br>&#125;<br></code></pre></td></tr></table></figure>

Expand Down
Loading

0 comments on commit 5476420

Please sign in to comment.