主要通過以下幾個(gè)過程生成:
讓客戶滿意是我們工作的目標(biāo),不斷超越客戶的期望值來(lái)自于我們對(duì)這個(gè)行業(yè)的熱愛。我們立志把好的技術(shù)通過有效、簡(jiǎn)單的方式提供給客戶,將通過不懈努力成為客戶在信息化領(lǐng)域值得信任、有價(jià)值的長(zhǎng)期合作伙伴,公司提供的服務(wù)項(xiàng)目有:空間域名、網(wǎng)站空間、營(yíng)銷軟件、網(wǎng)站建設(shè)、宜章網(wǎng)站維護(hù)、網(wǎng)站推廣。
(一)編寫模板文件
(二)配置FreeMarker
(三)統(tǒng)一文件生成工具
(四)數(shù)據(jù)庫(kù)操作
(五)封裝填充數(shù)據(jù)
FreeMarker是一款模板引擎:即一種基于模板和動(dòng)態(tài)數(shù)據(jù),用于輸出文本的通用工具。
FreeMarker模板使用FreeMarker Template Language(FTL)編寫,它是一種簡(jiǎn)單的、專用的語(yǔ)言。
代碼生成器的實(shí)現(xiàn)原理十分簡(jiǎn)單,就是根據(jù)數(shù)據(jù)庫(kù)的某一個(gè)或多個(gè)業(yè)務(wù)表的結(jié)構(gòu),生成對(duì)應(yīng)的Entity.java、Dao.java、Service.java、Controller.java、Mapper.xml文件
代碼生成器生成代碼,分三層: 數(shù)據(jù)層、業(yè)務(wù)層、界面層;
1.數(shù)據(jù)層:①數(shù)據(jù)服務(wù)
2.業(yè)務(wù)層:②業(yè)務(wù)邏輯+數(shù)據(jù)工廠,③業(yè)務(wù)實(shí)體
3.界面層:④界面層
三層中每個(gè)表都會(huì)對(duì)應(yīng)一個(gè)類,作用分別如下:
1、BLL:BusinessLogicLayer業(yè)務(wù)邏輯層。作用:處理數(shù)據(jù)加工方式 - 實(shí)現(xiàn)數(shù)據(jù)加工處理方法 - 加工后交給數(shù)據(jù)訪問層提交到數(shù)據(jù)庫(kù)。
2、DAL:DataAccessLayer數(shù)據(jù)訪問層。作用:數(shù)據(jù)最終處理的地方 - 直接與數(shù)據(jù)庫(kù)交互。
3、Model:數(shù)據(jù)模型,通常稱為數(shù)據(jù)實(shí)體。作用:將數(shù)據(jù)實(shí)例化 - 便于程序取值/賦值 - 直接與界面層交互。
1
打開工具,點(diǎn)擊如下圖的連接SQL Server數(shù)據(jù)庫(kù)服務(wù)器;
2
如圖,填寫好數(shù)據(jù)庫(kù)相關(guān)配置,點(diǎn)擊連接測(cè)試,可以看到你的數(shù)據(jù)庫(kù)出現(xiàn)在了下拉列表中,點(diǎn)擊選擇你的數(shù)據(jù)庫(kù),點(diǎn)擊下一步;
3
如圖,選擇要生成代碼的數(shù)據(jù)庫(kù);
4
填寫項(xiàng)目解決方案的名稱和存儲(chǔ)位置的信息;
5
選擇要生成代碼的表,選擇你需要的模板,如圖,根據(jù)需求填寫;
6
點(diǎn)擊開始生成,生成好了一個(gè).NET的解決方案,里面的必要的代碼已經(jīng)自動(dòng)生成好;
請(qǐng)采納我的問題
1、一個(gè)女生前一天晚上得到男朋友的訂婚戒指,但竟沒有一個(gè)同學(xué)注意到,令她忿忿不平。到下午大家坐著談天的時(shí)候,她突然站起來(lái)大聲說:“哎呀,這里真熱呀,我看我還是把戒指脫下來(lái)吧。”2、女主人把女傭叫到面前問她:“你是否懷孕了?”“是?。 迸畟蚧氐?。“虧你還說得出口,你還沒有結(jié)婚,難道不覺得害羞嗎?”女主人再次訓(xùn)。“我為什么要害羞,女主人你自己不也懷孕了嗎?”“可是我懷的是我丈夫的!”女主人生氣地反駁?!拔乙彩前?!”女傭高興地附和。3、一個(gè)人騎摩托車喜歡反穿衣服,就是把口子在后面扣上,可以擋風(fēng)。一天他酒后駕駛, 翻了,一頭栽在路旁。警察趕到:警察甲:好嚴(yán)重的車禍。警察乙:是啊,腦袋都撞到后面去了。警察甲:嗯,還有呼吸,我們幫他把頭轉(zhuǎn)回來(lái)吧。警察乙:好.....一、二使勁,轉(zhuǎn)回來(lái)了。警察甲:嗯,沒有呼吸了.......4、在一條七拐八拐的鄉(xiāng)村公路上,因?yàn)闀r(shí)常發(fā)生車禍,所以常常有一些鬼故事發(fā)生,有一天晚上,有一個(gè)出租車司機(jī)看見路邊有一個(gè)長(zhǎng)發(fā)披肩,身著白衣的女人向他招手,因?yàn)檫@個(gè)司機(jī)沒有見過鬼,所以大膽的停下來(lái)讓她上車了,這一路上,司機(jī)雖然不信有鬼,心里也毛毛的,所以時(shí)常從后視鏡看后面的女人,開著開著,突然司機(jī)發(fā)現(xiàn)那個(gè)女人不見了!司機(jī)嚇了一大跳,趕緊踩了一個(gè)剎車!只見那個(gè)女人滿臉是血,表情猙獰。司機(jī)嚇的牙直打顫。突然那女人開口了:“你會(huì)不會(huì)開車?。∥业皖^系個(gè)鞋帶你突然一剎車我把鼻子都撞破了……”5、一個(gè)病人去看病,醫(yī)生檢查了他,皺著眉頭說:“您病得太嚴(yán)重了,恐怕不會(huì)活多久了。” 病人:“求您告訴我我還能活多久?” 醫(yī)生:“十……” 病人著急地問:“十什么?十年??十個(gè)月???十天?????” 醫(yī)生:“十,九,八,七,六,五……”6、老師:“你能說一些18世紀(jì)科學(xué)家共同特點(diǎn)嗎?”學(xué)生:“能,他們都死了?!?、犀糞蜣和蚊子談戀愛,蜣問蚊子是做什么工作的,蚊子說:“護(hù)士,打針的?!彬抟慌拇笸龋骸熬壏謪龋沂侵兴幘执晁幫璧摹?、一非洲人住在某一賓館。夜半,起火,不明原因。非洲人見狀顧不了那么許多,光著身子就跑出去了。消防員見狀驚呼:“我的媽呀!都燒的糊了吧區(qū)的了還能跑那么快!”9、一個(gè)人想出國(guó)考察,但必須得到老總批準(zhǔn)。于是他向老總請(qǐng)示,老總給了他一張字條,上面寫著:“Go ahead”。 那人想:“Go ahead=前進(jìn),老總是批準(zhǔn)了。”于是他開始打點(diǎn)行李。 一個(gè)同事見到了他問:“你在做什????”他說:“我準(zhǔn)備出國(guó)考察,老總批準(zhǔn)了,給我寫了‘Go ahead’?!?同事一見條就樂了:“咱們老總根本就沒批準(zhǔn)??!咱老總的英語(yǔ)水平你還不知道,他這是在說去個(gè)頭!”10、牧師對(duì)買了他馬和馬車的農(nóng)夫說:“這匹馬只能聽懂教會(huì)的語(yǔ)言,叫"感謝上帝"它就跑;叫"贊美上帝"它才停下?!鞭r(nóng)夫?qū)⑿艑⒁?,他試著喊了一聲感謝上帝,那匹馬立刻飛奔起來(lái),越跑越快。一只跑到懸崖邊上驚恐的農(nóng)夫才想起讓它停下來(lái)的口令“贊美上帝”。果然,馬停下來(lái)了。死里逃生的農(nóng)夫長(zhǎng)出一口氣:“感謝上帝………”
我打了很久,請(qǐng)采納
1 the night before, a girl get boyfriend engagement ring, but no one noticed the classmate, make her antics. You sit and chat in the afternoon, she suddenly stood up and shouted: \"oh, it's really hot in here, I think I'd better take off your ring.\" 2, the mistress called the maid to ask her: \"are you pregnant?\" \"Yes!\" The maid answered. Export \"kui you still say, you are not married, don't you feel shy?\" The hostess training again. \"Why should I be shy, you don't the hostess also pregnant?\" \"But I conceive is my husband!\" The hostess retorted angrily. \"Me too!\" The maid happy to echo. 3, a man riding a motorcycle like the dress, is to cut on the back, can the wind. Drunk driving one day, he turned over, a planted on the road. Police: police a: a good serious car accident. Policeman b: yes, his head hit the back. Po1: well, still breathing, let's help him turn his head back. Po2: good... One, two, turn back. Policeman a: well, not breathing... 4, turn in a curvy country road, because often in a car accident, so often have some ghost story, one night, there's a taxi driver saw the side of the road have a long hair shawls, dressed in a white woman waved to him, because the driver didn't see a ghost, so bold stopped to let her get on the bus, along the way, the driver doesn't believe in ghosts, the in the mind also maomao, so often the woman behind the rearview mirror to see, open open, the driver found the woman suddenly disappeared! The driver startled, hurriedly stepped on a brake! I saw the woman face is blood, grim expression. The driver frighten of teeth chatter. Suddenly the woman spoke: \"would you drive! I bow to fasten shoelaces are you smashed through a sudden brake my nose...\" 5, a patient to see a doctor, the doctor examined him, frowning said: \"you too serious ill, I'm afraid I won't live much longer.\" Patient: \"please tell me how long will I live?\" Doctor: \"ten...\" Patient anxiously asked: \"what? Ten years?? Ten months??? Ten days?????\" Doctor: \"ten, nine, eight, seven, six, five...\" 6, teacher: \"can you say some 18 th-century scientists common characteristics?\" Student: \"yes, they are all dead.\" 7, rhino poop Qiang and mosquito fall in love, Qiang asked a mosquito is to do what work, the mosquito said: \"nurse, give or take an injection.\" Qiang a clap a thigh: \"the fate, I am a traditional Chinese medicine bureau rub pills...\" 8, the africans live in a hotel. In the midnight, a fire, unknown reason. Before rushing so many africans, naked and ran out. Firefighters said exclaimed: \"my mama ah! All paste the burned area can run so fast!\" 9, a person wants to go abroad, but it must be approved by boss. So he to the manager for instructions, the boss gave him a note, it read: \"Go ahead\". The man thought, \"Go ahead = progress, boss is approved.\" So he started to packing. A colleague to see he asked: \"what are you doing?\" He said: \"I'm ready to Go abroad investigation, boss approved, wrote me 'Go ahead'.\" Colleague of joy at the sight of article: \"let's boss haven't approved!!!!! Our boss English don't you know, he is said to head!\" 10, priests to buy his horse and carriage of the farmer said, \"this horse can only understand the language of the church, call\" thank god \"it ran; called\" praise god \"it didn't stop.\" Farmer track, he tried to thank god gave a cry, the horse gallop, immediately ran faster and faster. A run to the edge of the cliff frightened farmer remembered that let it stop password \"praise god\". Sure enough, the horse stopped. Close the farmer grows a sigh: \"thank god.........\"
I played for a long time, please
for index,val := range a {
if val == '好' {
fmt.println(index,x)
}
}
對(duì)string做range得到的val是int32類型,直接用單引號(hào)比較就行