File tree Expand file tree Collapse file tree 6 files changed +34
-36
lines changed
fj-doc-maven-plugin/src/main/resources/config/template/flavour Expand file tree Collapse file tree 6 files changed +34
-36
lines changed Original file line number Diff line number Diff line change 8181 <@createPathMethod context=context outputMime=outputMime outputExtension=outputExtension outputDescription=outputDescription/ >
8282</#macro >
8383
84- <#macro createSpringBootPath context outputMime outputExtension outputDescription ><@createSpringBootPathPrefix context=context outputMime=outputMime outputExtension=outputExtension outputDescription=outputDescription pathPrefix=''/ ></#macro >
84+ <#macro createSpringBootPath context outputMime outputExtension outputDescription ><@createSpringBootPathPrefix context=context outputMime=outputMime outputExtension=outputExtension outputDescription=outputDescription pathPrefix=''/ ></#macro >
85+
86+ <#macro docProcessConfigDocHelperComment context >
87+ /*
88+ * FreemarkerDocProcessConfig is thread-safe and should be initialized once for each config file.
89+ *
90+ * Consider using a @ApplicationScoped or Singleton approach.
91+ */
92+ </#macro >
93+
94+ <#macro getDocProcessConfigDocHelperComment context >
95+ /**
96+ * Accessor for FreemarkerDocProcessConfig configuration.
97+ *
98+ * @return the FreemarkerDocProcessConfig instance associated with this helper.
99+ */
100+ </#macro >
101+
102+ <#macro docHelperBody context >
103+ public class DocHelper {
104+
105+ <@docProcessConfigDocHelperComment context=context/ >
106+ private FreemarkerDocProcessConfig docProcessConfig = FreemarkerDocProcessConfigFacade.loadConfigSafe( "cl://${context.resourcePathFmConfigXml} " );
107+
108+ <@getDocProcessConfigDocHelperComment context=context/ >
109+ public FreemarkerDocProcessConfig getDocProcessConfig() { return this.docProcessConfig; }
110+
111+ }
112+ </#macro >
Original file line number Diff line number Diff line change @@ -6,10 +6,4 @@ import org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfigFacade;
66import jakarta.enterprise.context.ApplicationScoped;
77
88@ApplicationScoped
9- public class DocHelper {
10-
11- private FreemarkerDocProcessConfig docProcessConfig = FreemarkerDocProcessConfigFacade.loadConfigSafe( "cl://${context.resourcePathFmConfigXml} " );
12-
13- public FreemarkerDocProcessConfig getDocProcessConfig() { return this.docProcessConfig; }
14-
15- }
9+ <@fhm.docHelperBody context=context/ >
Original file line number Diff line number Diff line change @@ -6,10 +6,4 @@ import org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfigFacade;
66import jakarta.enterprise.context.ApplicationScoped;
77
88@ApplicationScoped
9- public class DocHelper {
10-
11- private FreemarkerDocProcessConfig docProcessConfig = FreemarkerDocProcessConfigFacade.loadConfigSafe( "cl://${context.resourcePathFmConfigXml} " );
12-
13- public FreemarkerDocProcessConfig getDocProcessConfig() { return this.docProcessConfig; }
14-
15- }
9+ <@fhm.docHelperBody context=context/ >
Original file line number Diff line number Diff line change @@ -6,10 +6,4 @@ import org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfigFacade;
66import jakarta.enterprise.context.ApplicationScoped;
77
88@ApplicationScoped
9- public class DocHelper {
10-
11- private FreemarkerDocProcessConfig docProcessConfig = FreemarkerDocProcessConfigFacade.loadConfigSafe( "cl://${context.resourcePathFmConfigXml} " );
12-
13- public FreemarkerDocProcessConfig getDocProcessConfig() { return this.docProcessConfig; }
14-
15- }
9+ <@fhm.docHelperBody context=context/ >
Original file line number Diff line number Diff line change @@ -6,10 +6,4 @@ import org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfigFacade;
66import jakarta.enterprise.context.ApplicationScoped;
77
88@ApplicationScoped
9- public class DocHelper {
10-
11- private FreemarkerDocProcessConfig docProcessConfig = FreemarkerDocProcessConfigFacade.loadConfigSafe( "cl://${context.resourcePathFmConfigXml} " );
12-
13- public FreemarkerDocProcessConfig getDocProcessConfig() { return this.docProcessConfig; }
14-
15- }
9+ <@fhm.docHelperBody context=context/ >
Original file line number Diff line number Diff line change @@ -6,10 +6,4 @@ import org.fugerit.java.doc.freemarker.process.FreemarkerDocProcessConfigFacade;
66import org.springframework.stereotype.Component;
77
88@Component
9- public class DocHelper {
10-
11- private FreemarkerDocProcessConfig docProcessConfig = FreemarkerDocProcessConfigFacade.loadConfigSafe( "cl://${context.resourcePathFmConfigXml} " );
12-
13- public FreemarkerDocProcessConfig getDocProcessConfig() { return this.docProcessConfig; }
14-
15- }
9+ <@fhm.docHelperBody context=context/ >
You can’t perform that action at this time.
0 commit comments