속성 파일 struts. properties

Struts 2 의 핵심 JAR 패키지 의 org. apache. struts 2 디 렉 터 리 에 기본 속성 설정 파일 default. properties 를 제공 합 니 다. 속성 을 사용자 정의 하려 면 웹 콘 텐 츠 / WEB - INF / classes 디 렉 터 리 에 struts. properties 를 추가 하여 시스템 의 기본 파일 속성 을 덮어 써 야 합 니 다.뒤의 개발 에서 우 리 는 복 제 된 struts. properties 를 사용 하여 시스템 의 속성 을 설정 할 것 이다.
이 파일 에는 일련의 키 쌍 이 포함 되 어 있 습 니 다. 기본 default. properties 의 내용 을 중국어 로 복사 하여 번역 합 니 다. 각 속성 에 대한 설명 은 프로그램 24 - 1 과 같 습 니 다.
프로그램 24 - 1  default. properties 설정 옵션

  
  
  
  
  1. ###  Struts 2 , ,  
  2. ### org.apache.struts2.config.Configuration  
  3. # struts.configuration=org.apache.struts2.config.DefaultConfiguration  
  4.  
  5. ###   
  6. # struts.locale=en_US  
  7. struts.i18n.encoding=UTF-8  
  8.  
  9. ###  , ,  
  10. ### com.opensymphony.xwork2.ObjectFactory  
  11. # struts.objectFactory = spring  
  12.  
  13. ###  Spring , autoWiring ,  
  14. ### name、type、auto constructor(Name )  
  15. struts.objectFactory.spring.autoWire = name  
  16.  
  17. ###  Spirng , ,  
  18. truefalsetrue )  
  19. struts.objectFactory.spring.useClassCache = true 
  20.  
  21. ###  , "tiger"or"notiger",  
  22. ###  com.opensymphony.xwork2.util.ObjectTypeDeterminer  
  23. #struts.objectTypeDeterminer = tiger  
  24. #struts.objectTypeDeterminer = notiger  
  25.  
  26. ###  MIME-type multipart/form-data  
  27. # struts.multipart.parser=cos  
  28. # struts.multipart.parser=pell  
  29. struts.multipart.parser=jakarta  
  30. #  javax.servlet.context.tempdir  
  31. struts.multipart.saveDir=  
  32. struts.multipart.maxSize=2097152  
  33.  
  34. ###   
  35. # struts.custom.properties=application,org/apache  
  36. /struts2/extension/custom  
  37.  
  38. ### URL Action  
  39. #struts.mapper.class=org.apache.struts2.dispatcher.  
  40. mapper.DefaultActionMapper  
  41.  
  42. ###  URL , , , action,jnlp,do  
  43. struts.action.extension=action  
  44.  
  45. ###  FilterDispatcher ,true Struts serves static 
  46. content jar  
  47. ### false static content <context_path>/struts  
  48. struts.serve.static=true 
  49.  
  50. ### Struts  
  51. struts.serve.static.browserCache=true 
  52.  
  53. ###  , true,  
  54. <action>  
  55. ### <action name="*/*" method="{2}" class="actions.{1}">  
  56. struts.enable.DynamicMethodInvocation = true 
  57.  
  58. ###  action "/", true,  
  59. "/foo/edit" "/foo/save" 
  60. ### <action name="*/*" method="{2}" class="actions.{1}">  
  61. struts.enable.SlashesInActionNames = false 
  62.  
  63. ###  %{} tags  
  64. struts.tag.altSyntax=true 
  65.  
  66. ### Struts  
  67. struts.devMode = false 
  68.  
  69. ###     
  70. struts.i18n.reload=false 
  71.  
  72. ###  UI template UI templates    
  73. struts.ui.theme=simple  
  74. struts.ui.templateDir=template  
  75. #  , ftl、vm、jsp  
  76. struts.ui.templateSuffix=ftl  
  77.  
  78. ###  struts.xml ,  
  79. struts.configuration.xml.reload=false 
  80.  
  81. ### velocity , velocity.properties  
  82. struts.velocity.configfile = velocity.properties  
  83.  
  84. ### velocity context  
  85. struts.velocity.contexts =  
  86.  
  87. ### velocity  
  88. struts.velocity.toolboxlocation=  
  89.  
  90. ###  HTTP、HTTPS  
  91. struts.url.http.port = 80  
  92. struts.url.https.port = 443  
  93. ###  URL includeParams, none、get、all  
  94. struts.url.includeParams = get  
  95.  
  96. ###  ( .properties )  
  97. struts.custom.i18n.resources=com.demo.struts2.resources.  
  98. ApplicationResources  
  99.  
  100. ###  servlet ,  
  101. WebLogic、Orion、and OC4J  
  102. struts.dispatcher.parametersWorkaround = false 
  103.  
  104. ###  Freemarker Manager , org.apache.struts2.
  105. views.freemarker.FreemarkerManager  
  106. #struts.freemarker.manager.classname=org.apache.struts2.  
  107. views.freemarker.FreemarkerManager  
  108.  
  109. ###  FreeMarker templates  
  110. struts.freemarker.templatesCache=false 
  111.  
  112. ###  BeanWrapper  
  113. struts.freemarker.beanwrapperCache=false 
  114.  
  115. ###  StrutsBeanWrapper javadocs  
  116. struts.freemarker.wrapper.altMap=true 
  117.  
  118. ### XSLT  
  119. struts.xslt.nocache=false 
  120.  
  121. ### Struts  
  122. struts.configuration.files=struts-default.xml,  
  123. struts-plugin.xml,struts.xml  
  124.  
  125. ###  "/"  
  126. struts.mapper.alwaysSelectFullNamespace=false 

그 중에서 굵 은 부분 은 비교적 중요 하고 자주 사용 하 는 배치 속성 으로 뒤의 개발 에서 우 리 는 위의 굵 은 부분의 속성 에 대해 서도 배치 할 것 이다.

좋은 웹페이지 즐겨찾기