is there any function for freemarker to change the string news_type into NewsType
is there any function for freemarker to change the string news_type into NewsType
you can refer to my previous answer to this question
https://codeshelper.com/q/10...
it's just that your needs are reversed. Please refer to @ CloudFlying in the following code
<-sharpfunction dashedToCamel(s)>
<-sharpreturn s
?replace('(^_+)|(_+$)', '', 'r')
?replace('\\_+(\\w)?', ' $1', 'r')
?replace('([A-Z])', ' $1', 'r')
?capitalize
?replace(' ' , '')
?uncap_first
>
</-sharpfunction>
${dashedToCamel("___caMel___to_under_scOre_teSt____")}
output: caMelToUnderScOreTeSt
if you want the first letter to be capitalized, remove the line ? uncap_first
from function.
Previous: How many times will @ Autowired be executed under the singleton?
Next: Security: the server has been attacked recently. Please help me write a rule.
how should I open the index implementation on the home page of the website to query the relevant data from the background database and then bind it to the page? ...
am I full of question marks in Chinese when I integrate Springmvc and freemarker? this is an error screenshot Code presentation @ Bean public FreeMarkerConfigurer freeMarkerConfigurer () { FreeMarkerConfigurer configurer = new FreeMarkerConfig...
the information returned by the API is as follows: {"hello1":"","hello2":",","hello3":""} how can freemarker call the tag1 tag2 tag3 of this data as easily as js and separate the words in the...
the problem is the same as the title ...
1.FreeMarker generates a word document through the xml structure. What is opened on the mobile side is a xml document. PC opens normally, but on PC, use office or wps to open the document and save it as a new word document. It is normal to open it on the...
, ...
problem description now there is a requirement that background management can switch the language of the system, rather than automatically depending on the user s region. It is somewhat similar to Wordpress s language choice, as shown in figure ...
FTL Code: carrierDispute: { infoId: "${fmbInfo.infoId}", title: "${mbInfo.title}", brief: "${mbInfo.brief}", content: "${mbInfo.content}", addAttachmentList:[] mbInfo.addAttachmengList ArrayList }...
var vm = new Vue({ el: -sharpapp , data: { tabIndex: 0, isCarrier: false, carrierDispute: { infoId:"${mbInfo.infoId}", title:"${mbInfo.title}", brief:"${mbInf...
new HtmlWebpackPlugin({ filename: index.jsp , template: . src template.jsp }) Child html-webpack-plugin for "index.jsp": 1 asset [0] . node_modules _html-webpack-plugin@3.2.0@html-webpack-plugin lib loader.js!. src templ...
problem description in the SpringBoot2.0.1 version, the template uses Freemarker logs using log4j2 , but the project throws a warning when it visits the template page for the first time: the pom file has excluded log4j-related jar packages and lo...
traditional multi-page projects use html-webpack-plugin to load jsp or ftl files, because there is a special syntax inside, so directly using html-webpack-plugin will fail to package, and then use raw-loader on the basis of html-webpack-plugin t...