Skip to content

Commit 86665b8

Browse files
committed
add 专业课作业 Java核心应用 01
1 parent 6c13cde commit 86665b8

File tree

3 files changed

+29
-0
lines changed
  • docs
  • static/专业课作业/Java核心应用

3 files changed

+29
-0
lines changed

docs/02-开发/03-框架/Spring/Hilla/README.md

+25
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,31 @@ $ npx @hilla/cli init -h
121121
</tr>
122122
</table>
123123

124+
## 端点
125+
126+
> 参考:[Endpoints | Guides | React | Hilla Docs](https://hilla.dev/docs/react/guides/endpoints)
127+
128+
```kotlin
129+
package zone.yue.demo
130+
131+
import com.vaadin.flow.server.auth.AnonymousAllowed
132+
import dev.hilla.Endpoint
133+
134+
@Endpoint
135+
@AnonymousAllowed
136+
class HelloEndpoint {
137+
fun sayHello(name: String) = if (name !== "") "Hello $name" else ""
138+
}
139+
```
140+
141+
## 注解
142+
143+
### `@Nonnull`
144+
145+
用于将字段、方法、参数或类型参数标记为不可为 `null` 的注解。
146+
它被 Typescript 生成器用作类型可空性信息的来源。
147+
此注解的存在只是为了方便起见,因为传统的 `jakarta.annotation.Nonnull` 注解不适用于类型参数。
148+
124149
## 安全
125150

126151
### 使用 Spring Security 进行身份验证

docs/11-课程/专业课/INDEX.mdx

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ title: 专业课
44

55
# 专业课
66

7+
## Java 核心应用
8+
9+
01. <a target="_blank" href="/专业课作业/Java核心应用/01.7z"><code>01.7z</code></a>
10+
711
## JavaScript 编程设计
812

913
Word 文档先放代码,再放示例。
838 KB
Binary file not shown.

0 commit comments

Comments
 (0)