Skip to content

Commit 4b573ed

Browse files
committed
Update
1 parent ce6428a commit 4b573ed

10 files changed

+89
-115
lines changed

_pages/en/aspectran/user-guide.md

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ Aspectran provides two main ways to define a Translet.
5858

5959
```xml
6060
<translet name="/user/info">
61-
<action bean="userDao" method="getUserInfo"/>
62-
<transform format="json"/>
61+
<action bean="userDao" method="getUserInfo"/>
62+
<transform format="json"/>
6363
</translet>
6464
```
6565
The example above defines a Translet that, upon receiving a `/user/info` request, executes the `getUserInfo` method of the `userDao` bean and responds with the result transformed into JSON format.
@@ -113,13 +113,13 @@ Aspectran provides two main ways to define a Translet.
113113

114114
```xml
115115
<translet name="*" scan="/WEB-INF/jsp/**/*.jsp">
116-
<description>
117-
This automatically finds all JSP files in the '/WEB-INF/jsp/' directory and its subdirectories and registers them as Translets.
118-
The path of the discovered jsp file is specified as the value of the file attribute of the template element.
119-
</description>
120-
<dispatch>
121-
<template/>
122-
</dispatch>
116+
<description>
117+
This automatically finds all JSP files in the '/WEB-INF/jsp/' directory and its subdirectories and registers them as Translets.
118+
The path of the discovered jsp file is specified as the value of the file attribute of the template element.
119+
</description>
120+
<dispatch>
121+
<template/>
122+
</dispatch>
123123
</translet>
124124
```
125125
The rule above scans for all `.jsp` files in the `/WEB-INF/jsp/` directory and its subdirectories, and dynamically creates and registers Translets based on the file paths. For example, if a file `/WEB-INF/jsp/user/list.jsp` is found, a Translet named `user/list` is created. This feature is very useful for serving a large number of static view files and dramatically reduces repetitive Translet definitions.
@@ -540,11 +540,9 @@ AsEL uses three main tokens to access data in different scopes.
540540
* **`${...}` (Parameter Token)**: Accesses the **parameters** of the current request. It is mainly used to reference path variables or request parameters of a Translet.
541541
```xml
542542
<translet name="/users/${userId}">
543-
<action bean="userService" method="deleteUser">
544-
<arguments>
545-
<item value="${userId}"/> <!-- Passes the userId parameter extracted from the URL path as an argument to the action -->
546-
</arguments>
547-
</action>
543+
<action bean="userService" method="deleteUser">
544+
<argument value="${userId}"/> <!-- Passes the userId parameter extracted from the URL path as an argument to the action -->
545+
</action>
548546
</translet>
549547
```
550548

@@ -553,25 +551,19 @@ AsEL uses three main tokens to access data in different scopes.
553551
<action id="userResult" bean="userAction" method="getUser"/>
554552
<!-- The result of the above action is stored as an attribute named 'userResult' -->
555553
<dispatch name="user/detail">
556-
<attributes>
557-
<item name="user" value="@{userResult}"/> <!-- Passes the 'userResult' attribute to the view template as 'user' -->
558-
</attributes>
554+
<attribute name="user" value="@{userResult}"/> <!-- Passes the 'userResult' attribute to the view template as 'user' -->
559555
</dispatch>
560556
```
561557

562558
* **`#{...}` (Bean Token)**: Accesses a **bean or a bean's property** registered in the IoC container. It is useful for referencing static configuration values or the results of other bean method calls.
563559
```xml
564560
<bean id="appConfig" class="com.example.AppConfig">
565-
<properties>
566-
<item name="defaultPageSize">20</item>
567-
</properties>
561+
<property name="defaultPageSize">20</property>
568562
</bean>
569563

570564
<action bean="boardService" method="getArticleList">
571-
<arguments>
572-
<!-- Passes the value of the defaultPageSize property of the appConfig bean as an argument -->
573-
<item value="#{appConfig.defaultPageSize}"/>
574-
</arguments>
565+
<!-- Passes the value of the defaultPageSize property of the appConfig bean as an argument -->
566+
<argument value="#{appConfig.defaultPageSize}"/>
575567
</action>
576568
```
577569

@@ -864,16 +856,16 @@ The `transform` response is used to directly generate the response body by conve
864856
* **JSON Conversion**: Use `format="json"` to convert the processing result into a JSON string. This is most commonly used in REST APIs. Adding the `pretty="true"` attribute will format the output for readability.
865857
```xml
866858
<translet name="/api/users/1">
867-
<action bean="userService" method="getUser" id="user"/>
868-
<transform format="json" pretty="true"/>
859+
<action bean="userService" method="getUser" id="user"/>
860+
<transform format="json" pretty="true"/>
869861
</translet>
870862
```
871863
872864
* **XML Conversion**: Use `format="xml"` to convert to XML.
873865
```xml
874866
<translet name="/api/users/1.xml">
875-
<action bean="userService" method="getUser" id="user"/>
876-
<transform format="xml" pretty="true"/>
867+
<action bean="userService" method="getUser" id="user"/>
868+
<transform format="xml" pretty="true"/>
877869
</translet>
878870
```
879871
@@ -882,10 +874,10 @@ The `transform` response is used to directly generate the response body by conve
882874
<translet name="/api/users/1/info">
883875
<action bean="userService" method="getUser" id="user"/>
884876
<transform format="text">
885-
<template>
886-
User Name: @{user.name}
887-
Email: @{user.email}
888-
</template>
877+
<template>
878+
User Name: @{user.name}
879+
Email: @{user.email}
880+
</template>
889881
</transform>
890882
</translet>
891883
```

_pages/en/docs/guides/aspectran-translet.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ A Translet is defined as a **collection of declarative rules** in XML or APON (A
1616
```xml
1717
<translet name="/user/info">
1818
<!-- Rules that define how to handle the request -->
19-
<action bean="userDao" method="getUserInfo"/>
20-
<transform format="json"/>
19+
<action bean="userDao" method="getUserInfo"/>
20+
<transform format="json"/>
2121
</translet>
2222
```
2323

@@ -64,11 +64,11 @@ One of Aspectran's most powerful features is **dynamic Translet generation**. Fo
6464

6565
```xml
6666
<translet name="*" scan="/WEB-INF/jsp/**/*.jsp">
67-
<description>
68-
This automatically finds all JSP files in the '/WEB-INF/jsp/' directory and its subdirectories and registers them as Translets.
69-
The path of the discovered jsp file is specified as the value of the file attribute of the template element.
70-
</description>
71-
<dispatch name="/"/>
67+
<description>
68+
This automatically finds all JSP files in the '/WEB-INF/jsp/' directory and its subdirectories and registers them as Translets.
69+
The path of the discovered jsp file is specified as the value of the file attribute of the template element.
70+
</description>
71+
<dispatch name="/"/>
7272
</translet>
7373
```
7474

_pages/en/docs/guides/aspectran-view-technologies.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ JSP is a classic view technology that is executed directly by the servlet contai
2626
<dependency>
2727
<groupId>com.aspectran</groupId>
2828
<artifactId>aspectran-web</artifactId>
29-
<version>9.0.0</version>
29+
<version>9.4.0</version>
3030
</dependency>
3131
```
3232

@@ -51,7 +51,7 @@ Thymeleaf is a modern server-side Java template engine for both web and standalo
5151
<dependency>
5252
<groupId>com.aspectran</groupId>
5353
<artifactId>aspectran-with-thymeleaf</artifactId>
54-
<version>9.0.0</version>
54+
<version>9.4.0</version>
5555
</dependency>
5656
```
5757

@@ -77,7 +77,7 @@ FreeMarker is a powerful and widely used template engine for generating any kind
7777
<dependency>
7878
<groupId>com.aspectran</groupId>
7979
<artifactId>aspectran-with-freemarker</artifactId>
80-
<version>9.0.0</version>
80+
<version>9.4.0</version>
8181
</dependency>
8282
```
8383

@@ -103,7 +103,7 @@ Pebble is a lightweight yet powerful template engine inspired by Twig, known for
103103
<dependency>
104104
<groupId>com.aspectran</groupId>
105105
<artifactId>aspectran-with-pebble</artifactId>
106-
<version>9.0.0</version>
106+
<version>9.4.0</version>
107107
</dependency>
108108
```
109109

_pages/en/docs/guides/aspectran-xml-configuration.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,9 @@ The `<exception>` block contains one or more `<thrown>` elements, each configure
307307
```xml
308308
<aspect id="serviceLayerExceptionAspect">
309309
<joinpoint>
310-
pointcut: { +: **@*Service^** }
310+
pointcut: {
311+
+: **@*Service^**
312+
}
311313
</joinpoint>
312314
<advice bean="loggingAdviceBean"/> <!-- Can have other advice -->
313315
<exception>
@@ -545,9 +547,7 @@ You can specify methods to be called at certain points in a bean's lifecycle.
545547
<bean id="resourceManager" class="com.example.app.ResourceManager"
546548
initMethod="initialize"
547549
destroyMethod="cleanup">
548-
<properties>
549-
<item name="resourcePath" value="/data/my-resource.dat"/>
550-
</properties>
550+
<property name="resourcePath" value="/data/my-resource.dat"/>
551551
</bean>
552552
```
553553
When `resourceManager` is created, `initialize()` is called after its `resourcePath` property is set. When the application shuts down, `cleanup()` is called.
@@ -560,7 +560,7 @@ When using `<bean scan="...">`, you can use `<filter>` to include or exclude spe
560560
<bean scan="com.example.app.**">
561561
<filter>
562562
exclude: [
563-
"*.*Repository"
563+
*.*Repository
564564
]
565565
</filter>
566566
</bean>
@@ -594,10 +594,8 @@ You can also define required parameters for the translet. If a required paramete
594594
```xml
595595
<translet name="/users/view" method="GET">
596596
<request>
597-
<parameters>
598-
<!-- The 'userId' parameter is mandatory for this translet. -->
599-
<item name="userId" mandatory="true"/>
600-
</parameters>
597+
<!-- The 'userId' parameter is mandatory for this translet. -->
598+
<parameter name="userId" mandatory="true"/>
601599
</request>
602600
...
603601
</translet>
@@ -617,10 +615,8 @@ The "content" section of a translet (represented by `<content>` or implicitly by
617615
<!-- Call the 'getUser' method on the 'userService' bean -->
618616
<!-- The return value will be stored in an attribute named 'user' -->
619617
<action id="user" bean="userService" method="getUser">
620-
<arguments>
621-
<!-- Pass the 'userId' request parameter to the method -->
622-
<item value="@{userId}"/>
623-
</arguments>
618+
<!-- Pass the 'userId' request parameter to the method -->
619+
<argument value="@{userId}"/>
624620
</action>
625621
```
626622

_pages/en/docs/guides/practical-guide-to-pbe-token-based-authentication.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ Let's look at how tokens are configured and used in a real Aspectran application
4848

4949
First, set the password to be used for encryption through system properties in the `aspectran-config.apon` file.
5050

51-
`/Users/Aspectran/Projects/aspectran/aspectran/demo/app/config/aspectran-config.apon`
5251
```apon
5352
system: {
5453
properties: {

_pages/ko/aspectran/user-guide.md

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ Aspectran은 Translet을 정의하는 두 가지 주요 방법을 제공합니
5858

5959
```xml
6060
<translet name="/user/info">
61-
<action bean="userDao" method="getUserInfo"/>
62-
<transform format="json"/>
61+
<action bean="userDao" method="getUserInfo"/>
62+
<transform format="json"/>
6363
</translet>
6464
```
6565
위 예제는 `/user/info` 요청이 들어오면 `userDao` 빈의 `getUserInfo` 메소드를 실행하고, 그 결과를 JSON 형식으로 변환하여 응답하는 Translet을 정의합니다.
@@ -113,13 +113,13 @@ Aspectran은 Translet을 정의하는 두 가지 주요 방법을 제공합니
113113

114114
```xml
115115
<translet name="*" scan="/WEB-INF/jsp/**/*.jsp">
116-
<description>
117-
'/WEB-INF/jsp/' 디렉토리 하위 경로에서 모든 JSP 파일을 찾아서 Translet 등록을 자동으로 합니다.
118-
검색된 jsp 파일의 경로는 template 요소의 file 속성 값으로 지정됩니다.
119-
</description>
120-
<dispatch>
121-
<template/>
122-
</dispatch>
116+
<description>
117+
'/WEB-INF/jsp/' 디렉토리 하위 경로에서 모든 JSP 파일을 찾아서 Translet 등록을 자동으로 합니다.
118+
검색된 jsp 파일의 경로는 template 요소의 file 속성 값으로 지정됩니다.
119+
</description>
120+
<dispatch>
121+
<template/>
122+
</dispatch>
123123
</translet>
124124
```
125125
위 규칙은 `/WEB-INF/jsp/` 디렉터리와 그 하위 경로에 있는 모든 `.jsp` 파일을 스캔하여, 파일 경로에 따라 동적으로 Translet을 생성하고 등록합니다. 예를 들어, `/WEB-INF/jsp/user/list.jsp` 파일이 발견되면 `user/list`라는 이름의 Translet이 생성됩니다. 이 기능은 정적인 뷰 파일을 대량으로 서빙할 때 매우 유용하며, 반복적인 Translet 정의를 획기적으로 줄여줍니다.
@@ -540,11 +540,9 @@ AsEL은 세 가지 주요 토큰을 사용하여 서로 다른 스코프의 데
540540
* **`${...}` (파라미터 토큰)**: 현재 요청의 **파라미터(Parameter)**에 접근합니다. 주로 Translet의 경로 변수(Path Variable)나 요청 파라미터(Request Parameter) 값을 참조하는 데 사용됩니다.
541541
```xml
542542
<translet name="/users/${userId}">
543-
<action bean="userService" method="deleteUser">
544-
<arguments>
545-
<item value="${userId}"/> <!-- URL 경로에서 추출된 userId 파라미터를 action의 인자로 전달 -->
546-
</arguments>
547-
</action>
543+
<action bean="userService" method="deleteUser">
544+
<argument value="${userId}"/> <!-- URL 경로에서 추출된 userId 파라미터를 action의 인자로 전달 -->
545+
</action>
548546
</translet>
549547
```
550548

@@ -553,25 +551,19 @@ AsEL은 세 가지 주요 토큰을 사용하여 서로 다른 스코프의 데
553551
<action id="userResult" bean="userAction" method="getUser"/>
554552
<!-- 위 action의 결과는 'userResult'라는 속성으로 저장됨 -->
555553
<dispatch name="user/detail">
556-
<attributes>
557-
<item name="user" value="@{userResult}"/> <!-- 'userResult' 속성을 뷰 템플릿에 'user'라는 이름으로 전달 -->
558-
</attributes>
554+
<attribute name="user" value="@{userResult}"/> <!-- 'userResult' 속성을 뷰 템플릿에 'user'라는 이름으로 전달 -->
559555
</dispatch>
560556
```
561557

562558
* **`#{...}` (빈 토큰)**: IoC 컨테이너에 등록된 **빈(Bean) 또는 빈의 속성**에 접근합니다. 정적인 설정값이나 다른 빈의 메소드 호출 결과를 참조할 때 유용합니다.
563559
```xml
564560
<bean id="appConfig" class="com.example.AppConfig">
565-
<properties>
566-
<item name="defaultPageSize">20</item>
567-
</properties>
561+
<property name="defaultPageSize">20</property>
568562
</bean>
569563

570564
<action bean="boardService" method="getArticleList">
571-
<arguments>
572-
<!-- appConfig 빈의 defaultPageSize 속성 값을 인자로 전달 -->
573-
<item value="#{appConfig.defaultPageSize}"/>
574-
</arguments>
565+
<!-- appConfig 빈의 defaultPageSize 속성 값을 인자로 전달 -->
566+
<argument value="#{appConfig.defaultPageSize}"/>
575567
</action>
576568
```
577569

@@ -864,16 +856,16 @@ Aspectran은 액션 메소드의 처리 결과를 클라이언트에 반환하
864856
* **JSON 변환**: `format="json"`을 사용하여 처리 결과를 JSON 문자열로 변환합니다. REST API에서 가장 흔하게 사용됩니다. `pretty="true"` 속성을 추가하면 가독성 좋게 출력됩니다.
865857
```xml
866858
<translet name="/api/users/1">
867-
<action bean="userService" method="getUser" id="user"/>
868-
<transform format="json" pretty="true"/>
859+
<action bean="userService" method="getUser" id="user"/>
860+
<transform format="json" pretty="true"/>
869861
</translet>
870862
```
871863

872864
* **XML 변환**: `format="xml"`을 사용하여 XML로 변환합니다.
873865
```xml
874866
<translet name="/api/users/1.xml">
875-
<action bean="userService" method="getUser" id="user"/>
876-
<transform format="xml" pretty="true"/>
867+
<action bean="userService" method="getUser" id="user"/>
868+
<transform format="xml" pretty="true"/>
877869
</translet>
878870
```
879871

@@ -882,10 +874,10 @@ Aspectran은 액션 메소드의 처리 결과를 클라이언트에 반환하
882874
<translet name="/api/users/1/info">
883875
<action bean="userService" method="getUser" id="user"/>
884876
<transform format="text">
885-
<template>
886-
사용자 이름: @{user.name}
887-
이메일: @{user.email}
888-
</template>
877+
<template>
878+
사용자 이름: @{user.name}
879+
이메일: @{user.email}
880+
</template>
889881
</transform>
890882
</translet>
891883
```

_pages/ko/docs/guides/aspectran-translet.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Translet은 XML 또는 APON(Aspectran Object Notation) 형식의 **선언적인
1515

1616
```xml
1717
<translet name="/user/info">
18-
<!-- 요청을 어떻게 처리할지 정의하는 규칙들 -->
19-
<action bean="userDao" method="getUserInfo"/>
20-
<transform format="json"/>
18+
<!-- 요청을 어떻게 처리할지 정의하는 규칙들 -->
19+
<action bean="userDao" method="getUserInfo"/>
20+
<transform format="json"/>
2121
</translet>
2222
```
2323

@@ -64,11 +64,11 @@ Aspectran의 가장 강력한 기능 중 하나는 **동적 Translet 생성**입
6464

6565
```xml
6666
<translet name="*" scan="/WEB-INF/jsp/**/*.jsp">
67-
<description>
68-
'/WEB-INF/jsp/' 디렉토리 하위 경로에서 모든 JSP 파일을 찾아서 Translet 등록을 자동으로 합니다.
69-
검색된 jsp 파일의 경로는 template 요소의 file 속성 값으로 지정됩니다.
70-
</description>
71-
<dispatch name="/"/>
67+
<description>
68+
'/WEB-INF/jsp/' 디렉토리 하위 경로에서 모든 JSP 파일을 찾아서 Translet 등록을 자동으로 합니다.
69+
검색된 jsp 파일의 경로는 template 요소의 file 속성 값으로 지정됩니다.
70+
</description>
71+
<dispatch name="/"/>
7272
</translet>
7373
```
7474

0 commit comments

Comments
 (0)