- 이 문서는 오라클클럽에서 작성하였습니다.
- 이 문서를 다른 블로그나 홈페이지에 게재하실 경우에는 출처를 꼭 밝혀 주시면 고맙겠습니다.~^^
- 출처 : http://www.gurubee.net/display/USEWIKI/Source+Code+Sample?
- 오라클클럽 지식창고의 모든 문서는 크리에이티브 커먼즈의 저작자표시-비영리-동일조건변경허락(BY-NC-SA) 라이선스에 따라 자유롭게 사용할 수 있습니다.
For other macros, besides that of the source code macro discussed below, please visit The Guide to Confluence Macros.
The source code macro is a useful way of presenting technical information to a group of users online. It's use is very straightforward. Any form of code can be included between {code} elements and we provide arguments for XML, SQL, and Java.
As you read below, look for the bolded code tags to indicate how the highlighting occurs.
XML
\{code:XML\}
<test>
<another tag="attribute"/>
</test>
\{code\}
gives
<test> <another tag="attribute"/> </test>
SQL
\{code:SQL\}
SELECT * FROM TABLE1 WHERE ID=0 AND NAME NOT IN (SELECT NAME FROM NAMES)
\{code\}
SELECT * FROM TABLE1 WHERE ID=0 AND NAME NOT IN (SELECT NAME FROM NAMES)
Java
\{code:Java\}
package com.atlassian.confluence.admin.actions.macros;
import com.atlassian.confluence.renderer.UserMacroLibrary;
public class UserMacroBean
{
String name;
String template;
public UserMacroBean()
{
}
public UserMacroBean(String name, UserMacroLibrary userMacroLibrary)
{
this.name = name;
this.template = userMacroLibrary.getMacroTemplate(name);
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getTemplate()
{
return template;
}
public void setTemplate(String template)
{
this.template = template;
}
}
\{code\}
gives
package com.atlassian.confluence.admin.actions.macros; import com.atlassian.confluence.renderer.UserMacroLibrary; public class UserMacroBean { String name; String template; public UserMacroBean() { } public UserMacroBean(String name, UserMacroLibrary userMacroLibrary) { this.name = name; this.template = userMacroLibrary.getMacroTemplate(name); } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getTemplate() { return template; } public void setTemplate(String template) { this.template = template; } }
문서정보
- 이 문서는 오라클클럽에서 작성하였습니다.
- 이 문서를 다른 블로그나 홈페이지에 게재하실 경우에는 출처를 꼭 밝혀 주시면 고맙겠습니다.~^^
- 출처 : http://www.gurubee.net/display/USEWIKI/Source+Code+Sample?
- 오라클클럽 지식창고의 모든 문서는 크리에이티브 커먼즈의 저작자표시-비영리-동일조건변경허락(BY-NC-SA) 라이선스에 따라 자유롭게 사용할 수 있습니다.

