barriers / 阅读 / 详情

Spring Boot+Elasticsearch的集成中,@Document注解有什么作用?

2023-07-28 14:54:01
共4条回复
真可

public @interface Document {

String indexName(); //索引库名,个人建议以项目名称命名

String type() default ""; //类型,个人建议以实体类名称命名

short shards() default 5; //默认分区数

short replicas() default 1; //每个分区默认的备份数

String refreshInterval() default "1s"; //刷新间隔

String indexStoreType() default "fs"; //索引文件存储类型

}

苏萦

我之前下载过,在百度里可以找到,里面还有很多类型的都还可以

蓓蓓

Field(type = FieldType.Long, index = FieldIndex.not_analyzed, store = true)

type:es按照什么数据类型解析这个Field;

index:

FieldIndex.not_analyzed:不会分词,只能根据原词索引Field;

FieldIndex.analyzed:根据分词器分词,可以根据原词和分词后的词条索引Field;

北境漫步

《盗魂铃》(又名“二本金钱豹”、“八戒降妖”)

相关推荐

spring是什么意思?

1.Spring is the first season of a year.春天是一年中的第一个季节。2.Spring is a delightful season.春天是个让人欣喜的季节。3.The temperatures are moderate, and the blooming trees and flowers make the city bright with colors.春天气温适中,挂满绿叶的树和盛开的花朵给城市增添了明亮的色彩。4.Field,flower garden,the forest have a girl left behind traces of the spring.田野上,花圃上,森林里都有着春姑娘留下足迹。5.The breeze blowing,a fresh,delicate fragrance,elegant earthy oncoming.微风吹来,一阵清新、幽香、淡雅的泥土气息迎面而来。
2023-07-27 00:31:151

谁有my spring field trip作文,急!!!

Last Sunday, we went on a field trip. It was very interesting now; let me tell you something about our field trip. We got up early in the morning and we had breakfast together. Then, we rode to East park after we checked our backpacks and bikes. After one and a half hours, we arrived there. First, we went to the zoo those animals. There are monkeys, pandas, elephants, bears, wolves and so on. The animals were very cute and interesting. Then, we went boating. In the boat, we told jokes, sang songs and we also took many beautiful pictures. At last, we climbed up the mountain for our picnic. We ate many delicious food and fruits. We were very happy. What a special trip!
2023-07-27 00:31:351

Spring是怎么解决Bean之间的循环依赖的

Spring的循环依赖的理论依据其实是基于Java的引用传递,当我们获取到对象的引用时,对象的field或则属性是可以延后设置的(但是构造器必须是在获取引用之前)。Spring的单例对象的初始化主要分为三步:(1)createBeanInstance:实例化,其实也就是调用对象的构造方法实例化对象(2)populateBean:填充属性,这一步主要是多bean的依赖属性进行填充(3)initializeBean:调用spring xml中的init 方法。从上面讲述的单例bean初始化步骤我们可以知道,循环依赖主要发生在第一、第二部。也就是构造器循环依赖和field循环依赖。那么我们要解决循环引用也应该从初始化过程着手,对于单例来说,在Spring容器整个生命周期内,有且只有一个对象,所以很容易想到这个对象应该存在Cache中,Spring为了解决单例的循环依赖问题,使用了三级缓存。
2023-07-27 00:31:431

初三英语作文,3篇 90词,要中文翻译。急急急急急!!!

1.Spring is coming at last. . The field is very beautiful and colorful. There are many flowers. The spring girl is shining warmly with a soft breeze in her breath. Walking close to it, you will feel the faint smell of flowers, which makes you comfortable. They are not only beautiful, but also full of life. Many plants die, but while the wild flowers remains youthful energy. They seem to tell people to love life and work hard. The trees and grass are both green. The birds are singing happily in the trees. Look! Here is a river, quiet and crystal clear river mirror clouds peaks and forests. You can see colorful stones at the bottom of the river, and see birds flying on the sky and some fish in it. Many animals here, they are freedom and happiness. It is the right season for flying kites. I am flying a kite and running in the field. It brings me much happiness.I love the spring field, it is beautiful. And it is both warm and full of green.2.my winter holiday was very interesting.As that day i got back to my native hometown,cousins and cousines took me to ski.My skiing skill isn"t well,got down for 15 times,they laughed at me behind,i can"t help smiling too.The day of Spring Festival was the most happiness day,we had meal for the first,a table of delicious food,that made me so glad.Then we played the fireworks.The childrens waving the lightening ticket while watching the adults playing the fireworks.That was so beautiful!Like the stars rainning down the world.At the end,it was time to get the red bag.we were very exciting,and satisfied.Sometimes,we also go shopping and buying something we like. Winter holiday life was really abundant!3.After the rain, my friends play in the water puddles in the area. Walk through the rain, my feet felt very comfortable, We made a splash and made each other wet, and we really enjoyed ourselves. What"s more, we even saw a beautiful rainbow after rain. It is high up the sky. it"s colorful, with 7 colors. That is a pretty picutre.    Rain, you give us a cool, but also brought me happiness.
2023-07-27 00:31:533

求英语大神解答一下。

Notice A spring field trip will be taken at 7:00 this Sunday. You must get to the school gate before seven on Sunday morning. We will take a bus to the Great Wall. All of us must get everything ready for that. We should prepare some food and enough water. Some of us had better take some medicine in case of sickness. Besides, we must wear strong and comfortable shoes. We suggest that everyone should take a plastic bag to put rubbish in. We are about to come back about 4:00 in the afternoon. Class 2, Grade 8
2023-07-27 00:32:001

理想职业的英文

Zhao wei : now journapst has bee an ideal career for many young people 赵巍:现在记者这个职业已经成为很多年轻人心目中的 理想职业 。 Having a goal of making an ideal career , i strongly bepeve that all of my efforts will bring me great success 拥有了发展 理想职业 的目标,我坚信所有努力将给我带来巨大的成功。 Its an ideal career option for people who prefer to stay on the ground , yet still enjoy the dynamic environment of the airpne industry 假如您不甘于沉闷刻板的工作,这绝对是一份富挑战性的 理想职业 。 The top five desired careers among chinese female teens aged 16 - 19 included president or chief executive of a pany , senior management or manager , or teacher 在中国16至19岁女性青少年的职业选择中,前5个 理想职业 包括公司总裁或首席执行官、高级管理层或经理、或者教师。 A glaring discrepancy has emerged beeen the career ambitions of chinese female teenagers and their japanese counterparts , according to a survey pubpshed yesterday by a japanese think - tank 在中国16至19岁女性青少年的职业选择中,前5个 理想职业 包括公司总裁或首席执行官、高级管理层或经理、或者教师。日本女孩的前5个职业则包括家庭主妇、空中乘务员和儿童保育员。 But cox of health central " s internship program points out that internships expose young people to acppshed *** s in their desired professions ? a great source for standout remendations , many of which he has * penned for his former interns 但健康中心实习项目的考克斯指出:实习向年轻人展示了他们 理想职业 中的成功人士? ?一个丰富的杰出人物建议库,其中许多他还在写给以前实习生的信中引用过。 Meanwhile , pfe goes on in the kindergarten . someone strums a guitar and the pupils chime in to the song : puff the magic dragon , pves by the sea a dragon pves forever , but not so pttle boys . with hindsight , mcdull bepeves this could well be the maxim of the flower on the spring field kindergarten alumni 电影由动画及人物演绎的片段穿插而成,故事讲述在春田花花幼稚园一班小朋友毕业长大后,在社会做事的各种各样故事当年他们胸怀大志,幻想著属于自己将来的 理想职业 ,可是长大后的他们又会否如愿呢
2023-07-27 00:32:071

定递归验证关联的对象可以用于继承对象吗 spring validate

Spring数据校验spring拥有自己独立的数据校验框架,同时支持JSR303标注校验。springDataBinder在进行数据绑定时,可同时调用校验框架完成数据校验工作。在spring mvc中则可直接通过注解驱动的方式进行数据校验Validator校验接口boolean supports(Class<?> clazz):该校验器能够对clazz类型的对象进行校验void validate(Object target,Errors errors):对目标对象进行校验,并将校验错误记录到errorsLocalValidatorFactoryBeanLocalValidatorFactoryBean既实现了spring的validator接口,也实现了JSR303的Validator接口。只要在spring 容器中定义一个LocalValidatorFactoryBean,即可将其注入到需要校验的Bean中。<bean id="validator"class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>Spring mvc数据校验<mvc:annotation-driven>会默认装配好一个LocalValidatorFactoryBean,通过在处理方法的入参上标注@Valid注解即可让spring mvc执行数据校验工作。public String handle91(@Valid @ModelAttribute(“user”)Useruser,BindingResult bindingResult){if(bingingResult.hasErrors){return“/user/register”;}return “/user/showUser”}将入参对象添加@Valid注解,同时紧跟其后声明一个BindingResult的入参,根据BingingResult即可判断是否存在错误。绑定接口既可以是BindingResult也可以Errors类型在页面显示错误spring mvc除了会将表单/命令对象的校验结果保存在对应的BindingResult或Errors中,还会将所有校验结果保存到隐含模型中,也就是说即使处理方法的签名没有对应于表单/命令对象的校验结果入参,校验结果也不会丢失,它们始终可以在隐含模型中获取。隐含模型中所有数据最终通过HttpServletRequest的属性列表暴露给JSP视图对象。通过国际化资源显示错误信息每个属性在数据绑定和数据校验发生错误时,都会产生一个对应的FieldError对象,FieldError实现了org.springframework.context.MessageSourceResolvable接口。MessageSourceResolvable是可用国际化资源进行解析对象。MessageSourceResolvable提供3个接口Object getArguments():返回一组参数对象String[] getCodes():返回一组消息代码,每个代码对应一个资源属性,可以使用getArguments()返回的参数对资源属性进行参数替换String getDefaultMessage():默认消息当一个属性校验失败后,校验框架会为该属性生成4个消息代码,这些代码以校验注解类名为前缀,结合类名、属性名、属性类型名生成多个消息代码如User类的password属性标注了一个@Pattern的注解,当校验失败后会产生如下4个错误代码Parttern.user.passwordParttern.passwordParttern.java.lang.StringParttern当使用Sprng mvc标签显示错误信息时,Spring mvc查看web上下文是否装配了对应国际化消息,如果没有,则显示默认的错误消息,否则使用国际化消息对错误代码进行翻译。如果在数据类型转换或数据类型格式时发生错误,或者该有的参数不存在,或者调用处理方法时发生错误,都会在隐含模型中创建错误消息,其错误代码前缀说明如下:required:必要的参数不存在,如@RequestParam(“param1”)标注了一个入参,当请求参数不存在时typeMismatch:在数据绑定时发生数据类型不匹配methodInvocation:spring mvc在调用方法时发生错误示例如果”aaa”非数字参数传递给User的salary属性,将发生数据转换的错误,Spring将为该错误生成如下错误代码typeMismatch.user.salarytypeMismatch.salarytypeMismatch.longtypMismatch装配国际化资源<bean id="messageSource"class="org.springframework.context.support.ResourceBundleMessageSource"><propertyname="basename"><value>conf/i18n/messages</value></property></bean>也可以通过basenames属性指定多个国际化资源在conf/i18n下添加基名为messages的国际化资源,一个默认的messages.properties,另一个对应messages_zh_CN.properties自定义校验规则通过@InitBinder注解的initBinder方法中装配自定义MyValidator@InitBinderpublic void initBinder(WebDataBinder binder){binder.setValidtor(newXXX());//在进行数据绑定时使用的校验器}也可以借助请求处理方法的签名传递一个Errors或BindingResult对象进来,然后在处理方法中直接校验。public String handle92(@ModelAttribute(“user”Useruser,BindingResult bindingResult)){ValidationUtils.rejectIfEmptyOrWritespace(bindingResult,”username”,”required”);//产生的错误信息对象错误代码包括//required.user.username// required.username// required.java.lang.String// requiredif(“aaa”.equalsIgnoreCase(user.getUsername())){bindingResult.rejectValue(“username”,”reserved”);//产生的错误代码如下//reserved.user.username// reserved.username// reserved.java.lang.String// reserved}if(bindingResult.hasErrors()){return “/user/register4”;}else{return “/user/showUser”;}}binder.setValidator()方法设置自定义的Validtor后,spring mvc将使用它对入参进行校验,将不在使用spring mvc框架装配的Validator对入参对象进行校验,即使入参标注了@Valid注解也不会校验
2023-07-27 00:32:151

spring中怎样自定义注解去校验枚举类型

首先定义一个Gender枚举校验注解@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER})@Retention(RUNTIME)@Documented@Constraint(validatedBy = {GenderValidator.class})public @interface GenderConstraint {String message() default "Invalid gender type";Class<?>[] groups() default {};Class<? extends Payload>[] payload() default {};}下面定义一个校验器,这个比较关键, 注意校验器ConstraintValidator泛型的第二个类型一定要是Enum<Gender>类型,之前一直就是这里不对所以一直报找不到ConstraintValidatorpublic class GenderValidator implements ConstraintValidator<GenderConstraint, Enum<Gender>> {@Overridepublic void initialize(GenderConstraint constraintAnnotation) {}@Overridepublic boolean isValid(Enum<Gender> value, ConstraintValidatorContext context) {if (value instanceof Gender) {return true;}return false;}}剩下的就是在模型里面加上注解@GenderConstraint就可以了。就跟用其它validator一样,如果校验失败则通过BindingResult来处理错误结果。
2023-07-27 00:32:221

关于80年代末九十年代初的阿迪达斯型号的问题!

天足系列
2023-07-27 00:32:322

关于春天的小学英语作文五篇

【 #英语资源# 导语】关于春天的小学英语作文下面是 ! 【篇一】关于春天的小学英语作文   Winter was gone,spring comes.I love spring best,because its very beautiful.In spring,the weather is aways sunny and rainy,its not cold and not hot,its warmer and warmer.The flowers begin to open and the trees begin to turn green.The birds are singing in the sky,they are happy.The animals will go out to play.Many people like to go out and enjoy the sunshine.I like wearing my sweater and jeans, I like to fly kites,plant trees and see the beautiful flowers. Spring is colorful,I think its a wonderful season. Whats your favourite season?Please tell me.   冬天过去了,春天来了。我最喜爱春天,因为它很漂亮。春天的天气总是晴朗多雨,不冷也不热,而且很暖和。花儿开始绽放,树木开始变绿。天上的鸟儿在歌唱,它们很快乐。动物会出去玩。许多人喜欢出去享受阳光。我喜欢穿上我的毛衣和牛仔裤,我喜欢放风筝、种树、观赏美丽的花朵。春天是五彩缤纷的,我认为这是一个美妙的季节。你最喜欢的季节是什么?请告诉我吧。 【篇二】关于春天的小学英语作文   As spring comes, everything on earth comes to life. After an overnight s raining, the trees and flowers seem to wear their new clothes. Birds are chanting in trees. Butterflies keep dancing in flowers. All these elements form an elegant spring life.   As spring comes, everything is in a rush. Swallows are busy with building their nests; frogs are busy with breeding their offspring; little grass is busy with growing up; seeds are busy with sprouting. And the farmers are busy with their farm work. Look, how hard they are working in their field! So there s no doubt that they will reap a good harvest through their hard work.   春天来了,地球上的一切都苏醒了。一整夜的雨之后,树木和鲜花似乎都穿上了新衣服。鸟儿在树上歌唱。蝴蝶在花花间跳舞。所有这些自然力量形成了一个优雅的春天生活。   春天来了,一切都是匆匆忙忙的。燕子正在忙着筑巢;青蛙都忙着繁殖后代;小草忙于成长;种子忙着发芽。农民忙于农活。看,在他们的田野上他们是多么努力的工作啊!所以毫无疑问,通过他们的努力工作他们会有一个很好的收成。 【篇三】关于春天的小学英语作文   春天在哪里?春天在哪里?春天在田野里。田野里长满了漫山遍野的油菜花像一片金色的海洋。农民伯伯在田野里插上了秧苗,春风一吹它们救在尽情跳舞。田野里的蒲公英长大了它们坐着顺风车去各地游玩。   Where is spring? Where is spring? Spring is in the field. The fields are full of rape flowers like a golden ocean. Farmer uncle planted seedling in the field, the spring breeze blows them to save in heartily dance. The dandelions in the fields grow up and they ride around in windmills.   春天在哪里?春天在哪里?春天在花园里。桃花笑红了脸,像穿上了一件粉红色的裙子显得楚楚动人。梨花开了像一片片雪花,五颜六色的郁金香实在是太美了。   Where is spring? Where is spring? Spring is in the garden. Peach blossom blushed with a smile, as if wearing a pink skirt. Pear blossom like a snowflake, colorful tulip is too beautiful.   春天在哪里?春天在哪里?春天在森林里。竹子挺着直直的身子像士兵。蘑菇像一把把小伞。哦原来春天在眼睛里。   Where is spring? Where is spring? Spring is in the forest. Bamboo has a straight body like a soldier. The mushroom is like an umbrella. Oh, spring is in my eyes. 【篇四】关于春天的小学英语作文   March breeze with moist, blows over the hills and fields, spring is coming.   Bid farewell to the cold winter, the birds fly freely in the sky, like to celebrate the arrival of spring.   You see, the sky white clouds forms and change multiterminal, like a magical magician magic from behind the clouds.   River, hits the trees smoke a lamina, greedy sucking the spring sunshine.   Ono flowers blossom, a swarm of bees "buzz" honey from flower to flower. A few butterflies came also, their beautiful wings hovering in the flowers, the flowers become more vibrant.   A stream wound its way into the distance, the glittering under the sun. A few duckling jumped into the water, exult in the water jump, chasing each other.   In large areas of wheat fields, green wheat seeding full sunshine rain and dew of spring, is thriving.   "The season of a year is in the spring, spring is the season of planting, is the season of nature is at its best, I love the beautiful spring.   三月的微风带着湿润的芬芳气息,吹过山峦和田野,春天来了。   告别了寒冷的"冬天,鸟儿们在天空上自由自在的飞翔,像是在庆祝春天的到来。   你瞧,天上的白云形态各异,变化多端,像一位神奇的魔术师躲在云后变魔术呢。   河岸边,一棵棵树木抽枝展叶,贪婪吮吸着春天的阳光。   小野花们竞相开放,一大群蜜蜂“嗡嗡嗡”地在花间采蜜。几只蝴蝶也来了,它们那美丽的翅膀在花丛中时隐时现,花丛变得更加生机勃勃了。   一条小河弯弯曲曲伸向远方,河水在阳光的照射下金光闪闪。几只小鸭跳入水中,在水里欢腾跳跃,互相追逐。   在大片的麦田里,绿色的麦苗饱吸着春天的阳光雨露,正在茁壮成长。   “一年之季在于春”,春天是播种的季节,是万物欣欣向荣的季节,我爱美丽的春天。 【篇五】关于春天的小学英语作文   "Where is the spring ah, where is the spring, the spring in the green forest, there are flowers, there is grass, there is little Orioles are singing." So we went to the grass to look for spring. The beautiful flowers in the grass with a bud, was very shy, he sent the intoxicating fragrance, refreshing.   Butterflies dancing beside them are colorful, as if deliberately decorated with beautiful flowers, so that the flowers full of vitality and set, like green leaves against red flowers, red flowers with butterflies. What a beautiful picture! It was easy for us to arrive early in the hidden spring.
2023-07-27 00:32:521

关于向日葵的英文句子语录

【 #英语资源# 导语】相信很多人都会喜欢向日葵,朝阳而生的向日葵充满了朝气。下面是由 考 网整理了一些关于向日葵的英文句子,希望大家会喜欢这些向日葵英文语录。 【篇一】关于向日葵的英文句子语录   Sunflower margarine has the same fat content as butter. 向日葵所制人造黄油的脂肪含量与黄油脂肪含量相同。   I frequently use sunflowers as symbols of strength. 我经常用向日葵来作为力量的象征。   The sunflower turns towards the sun. 向日葵向着太阳.   Sunflowers grow promptly. 向日葵生长迅速。   We passed through wheat fields and golden plots of sunflowers. 我们穿过小麦地和金黄色的向日葵地块.   The sunflower blushed to own the nameless flower as her kin. 向日葵羞于把无名的花朵看作它的同胞.   Xiao Lin is watering the sunflowers. 小林在给向日葵浇水.   The bird pecked seeds out of the sunflower. 那只鸟用喙从向日葵中啄出种子.   Every time you look a sunflower, the whole world starts to smile. 每次看见向日葵, 全世界都开始微笑.   Jasmine, Saving Face and Sunflower will be released in 20 《茉莉花开》、《面子》以及《向日葵》将于2005年发行放映.   A SUNFLOWER is a sunflower. A mobile phone is a mobile phone. 大家都知道,向日葵和手机,一个是植物,一个是机器,二者是截然不同的.   Why are the florets in a sunflower arranged in double spiral? 为什么向日葵中的小花是按照双螺旋的形状排列的 呢 ?   Sunflower cultivation to be promoted to meet cooking oil needs. 向日葵的栽种将扩大以满足于食品用油的需要.   The gods were deeply touched and changed her into a sunflower. 众神为她的痴情所深深打动,将她变成了一株向日葵.   Buddhist monks walk beside a field of sunflowers in northern Thailand. 几个僧人走在泰国北部的向日葵地里.   The Southern Knight stayed there, watching the sunflower as she wavedgoodbye. 南王站在那儿, 望着向日葵向他挥手告别.   The sunflowers could also be sold to local florists for profit. 向日葵也可以卖给当地花店来盈利. 【篇二】关于向日葵的英文句子语录   Bursts of spring, field rain, sunflowers tall, and has 56 leaves of. 一阵阵春风, 一场场春雨, 向日葵长高了, 已经有五六片叶子了.   The selfless dedication of his sunflower quiet door life. I like sunflowers. 向日葵默默无私的奉献他门的一生. 我喜欢向日葵.   Do you know, sunflower seeds are the sons of the sunflowers. 你知道吗, 葵花子是向日葵的种子.   To minimize head rot, plant to maximize air circulation. 为减少烂盘, 向日葵必须种植在空气循环量处.   The seeds took root and grew, and the sunflowers multiplied. 这些种子生根并生长, 向日葵不断的繁殖.   The sunflower chuckled quietly, amused at the man"s words. 向日葵被他的话逗得咯咯暗笑.   Who falls into the chimney a sunflower in full bloom? 谁落入了烟囱,像株盛开的向日葵一样?   The sunflower had not started where I saw the stalk begin. 向日葵并不是从我发现茎杆的地方开始生长的.   The grasshopper was singing and dancing on the sunflower. 蝗虫正对着向日葵唱歌跳舞.   People grow crops, such as wheat and sunflowers in this area. 这个地区种植如小麦和向日葵这样的庄稼.   If it is seen from above, the lake looks like a sunflower. 那座湖从上面俯视, 宛如一朵盛开的向日葵.   I like all flowers, specially like lotus, sunflower, violet and ume. 喜欢所有花, 尤其是荷花 、 向日葵 、 紫罗兰和梅花. 【篇三】关于向日葵的英文句子语录   Sunflower is a kind of beautiful flower. It has golden color and a round face. It looks like the sun, that is why people call it sunflower. Besides, it looks like a warm smile, too. When you look at it, it seems smile to you. It can bring warm to people. So, I like sunflower very much. During the day, its face turns to the sun all the time. When autumn comes, it is ripe. Therefore, we can eat its seeds. They are very delicious.   向日葵是一种美丽的花。它有着灿灿的金色和圆圆的脸蛋,看上去很像太阳,这就是为什么人们叫它向日葵。而且,它看起来像一个温暖的笑脸。当你看着它的时候,它好像在对你微笑。它能够给人们带来温暖。所以,我很喜欢向日葵。白天,它总是面向太阳。秋天来了,它就成熟了。因此,我们可以吃它的种子,它的种子很好吃。   小时候,老师说过,向日葵的花永远是跟着太阳走的。太阳走到哪里,花就面向哪里。所以,向日葵花也叫做太阳花。在我们的生活中,有这样一类人,他们总是乐观面对一切,每件事他们都能看到积极的一面,把他们叫做“向日葵族”应该很恰当吧。   The term "sunflower clan" is used to refer to people who, just like a sunflower, always look on the bright side of life and are resilient to pressure as they easily forget about unhappiness.   “向日葵族”指那些像向日葵一样的人,他们总能看到生活积极的一面,面对压力能够坦然应对,对于不快乐的经历能够转眼就忘记。   People in the sunflower clan are not that ambitious, and are easily content with what they"ve got. They believe that less desire can lead to more happiness.   向日葵族没有太大野心,“知足常乐”是他们信奉的座右铭之一。他们相信欲望越少,越容易快乐。
2023-07-27 00:32:591

JavaWeb项目到底该使用什么框架

每个人都有自己的理解,我肯定有不正确的地方,权且当抛砖引玉1.有的人认为使用了SSH可以大大提高系统速度,其实不然,我两个月前遇到的一个银行反洗钱项目就使用struts1.2 + jdbc开发,数据库20G左右,同样正常运行,速度还可以,我认为SSH提高的是非视图层的开发效率,减少了维护难度,对于运行速度倒不一定2.有的人认为只要会SSH的基本组合就可以了,其实不然,它们每个都是很多的版本,有些版本存在本质区别,如struts1和struts2的本质不同,spring2和spring2.5的注解配置,如果一点不考虑,一股脑采用配置文件,最终的结果只会被配置文件淹没,反而提高了维护难度,当然,太多的注解也让人昏迷,所以我认为必须对这些重点差异版本都进行学习,至少使用一会,自己去体会,找到配置文件和注解的平衡,从而提高开发效率,减少维护难度3.有的人认为hibernate好啊,有了它就万事大吉,其实不然,经过实践证明,它无法对复杂sql进行良好处理,事实上,实际项目中对复杂sql的需求相当高,远比增删改多,比如,我曾经做过的反洗钱系统中,三个大表,即使分表后依然千万级的数据量,并且三表还存在关联,使用hibernate,无法想象,所以我们使用ibatis2来专门处理复杂查询sql,以及批量修改和删除,使用hibernate来处理其他操作这里给一个SQL,看谁能使用HQL写出来,如果有,我佩服Sql代码 收藏代码 select datename(year,a.tr_date)+datename(month,a.tr_date)+(case when day(a.tr_date)<10 then "0"+datename(day,a.tr_date) else datename(day,a.tr_date) end ) as trade_date, datename(year,a.analyse_date)+datename(month,a.analyse_date)+(case when day(a.analyse_date)<10 then "0"+datename(day,a.analyse_date) else datename(day,a.analyse_date) end ) as analyse_date, datename(year,a.rep_date)+datename(month,a.rep_date)+(case when day(a.rep_date)<10 then "0"+datename(day,a.rep_date) else datename(day,a.rep_date) end ) as rep_date, a.*, d.*, s.file_name from tbriskshow a, tbriskshow_detail d, tbriskshow_relation r, rep_riskshow_file s where a.check_flag > 2 and a.sus_flag = 2 and r.id = a.id and r.tbriskdetail_id = d.id and a.status = 0 and a.type = 5 and s.riskshow_id = a.id 4.合理的配置文件布局很重要,项目开发才能正常进行,不要以为将所有struts,spring配置信息放置在一个文件中会很爽,如果你感觉到爽,那是因为你做的项目太小,所以全部按某种规范分开放置,使用总配置文件来引用这些配置5.再说说视图层,当前无外乎是JSP、CSS、JS、EL、JSTL、JSF、Jquery、Ext等技术,再高级点的就是使用JSP自定义标签技术将某些东西封装起成标签表单和表格,供统一调用,其实不管怎么样,由于每个人技术层次不同,到了后面维护必可避免的难搞,所以我结合我自己做过、参与过、看过的项目,认为视图层可以这样做:将所有控件封装(有人可能会说,这得封装多少东西啊,其实主要封装了表单、表格、树形、复选下拉、对话框,就能解决大部分问题),开发人员使用标准XML来配置界面以及其方法,再通过一个标准XML格式和服务器(SSH、存储过程)进行交互,这样,哪怕一个对界面完全没有感觉的人也能做出漂亮且风格完全统一的页面,并且维护相对容易,以下是一个示例页面配置XML: <!-- 菜单操作基础表单 --> <view id="10000011_form_base_conf"> <column>2</column> <defButtons>true</defButtons> <col type="number" field="cdbh" readonly="true" value="-1">菜单编号</col> <col type="number" field="fjbh" readonly="true" value="-1">父级编号</col> <col type="input" field="cdmc" must="true">菜单名称</col> <col type="select" field="sfzy" must="true" option="是:1|否:0">是否枝叶</col> <col type="number" field="pxh">排序号</col> <col type="input" field="ljdz" must="true">连接地址</col> </view> <!-- 添加菜单 --> <view id="10000011_form_add_conf"> <ext>10000011_form_base_conf</ext> <add_func_id>10000012</add_func_id> </view> <!-- 修改菜单 --> <view id="10000011_form_edit_conf"> <ext>10000011_form_base_conf</ext> <edit_func_id>10000013</edit_func_id> <delete_func_id>10000014</delete_func_id> </view> 数据访问XML: <func id="10000012"> <param name="cdmc" type="varchar" nullValue="" /> <param name="sfzy" type="int" nullValue="0" /> <param name="fjbh" type="int" nullValue="0" /> <param name="pxh" type="int" nullValue="0" /> <param name="ljdz" type="varchar" nullValue="" /> </func> 6.最后说说JavaWeb的未来,当然我个人认为的未来,随着Iphone,Ipad,安卓的普及,JavaWeb进军手机是必然的,就像当年PC上用PB,VB做的MIS,CRM等管理类桌面程序被大清洗一样(本人原来也是个PB程序员,后来转的Java,现在还依稀记得datewindow的风采),所以我认为JavaWeb的未来就是手持设备浏览器,服务器端其实应该没有太大变化,主要前端UI部分:多风格、多点触控式完全替代传统的表格、表单都是可能的,现在已经有不少框架出现,JQtouch、Jquery Mobile、Sencha Touch等等,当然这些我自己也还在学习中,谈不出什么,但我相信这就是未来,让我们拭目以待吧
2023-07-27 00:33:081

八年级英语期末复习计划

首先别急嘛,既然语法有点混乱,那就先盯着语法题做嘛,做错的要整理在错题笔记上,同时要学会反思,总结出题的出发点,做题技巧,成绩肯定上去。加油吧!
2023-07-27 00:33:2810

八年级下册unit6 单词

unit 6 1.collect v.收集;搜集 2.shell n.贝壳;壳 3.marathon n.(体育比赛中)马拉松赛跑; 4.pair n.一对;一双 5.skate n.溜冰鞋 6.since prep.&pron.自从;自......以来 7.Hilltop School 一学校名称,可译为山顶学校 8.raise v.筹集;筹募 9.several adj.几个的;数个的 10.skater n.溜冰者 11.stamp n.邮票 12.kite n.风筝 13.monster n.怪物;妖怪 14.globe n.球状物;球体 15.anymore pron.任何人 16.run out of 用完;用尽 17.store v.储存 18.cake n.蛋糕;糕、饼类食物 19.particularly adv.特别;尤其;异乎寻常的 20.collector n.搜集者;收藏者 21.by the way 顺便一提;附带说说 22.common adj.共同的;公共的 23.extra adj.额外的 24.coin n.钱币;硬币 25.topic n.话题;主题 26.been v.动词be的过去分词 27.be interested in 对......感兴趣 28.writer n.作家;作者 29.dynasty n.朝代;王朝 30.character n.(著名的)任务;名人 31.capital n.省会;首都 32.European adj.欧洲的;欧洲人的; n.欧洲人 33.Russian adj.俄罗斯的;俄罗斯的人;俄语的 n.俄罗斯人;俄语 34.Australian adj.澳大利亚的;澳大利亚的人 n.澳大利亚人 35.Jewish adj.犹太人的;犹太族 36.Jew n.犹太人;犹太教徒 37.thousand n.千 38.emperor n.皇帝 39.foreigner n.外国人 40.quite adv.相当;十分 41.certain adj.确实的;无疑的 42.the Olympus Games 奥林匹克运动会 43.far away 在远处 44.miss v.思念;想念
2023-07-27 00:33:554

springMVC 注解 启动时报错

你吧userController的 @Resourcesprivate IUserService userService;这样写试试
2023-07-27 00:34:032

ROSE是谁,J呢

姓名:诺珉宇 (No minwoo) 匿称:Hika(“光”的意思) 在乐队THE-TRAX中的艺名为ROSE (2005年离队) 国籍:韩国 身高/体重:183 cm /60 kg 腰围:24 inch等同于61cm 生日:1986.05.29 视觉系的RO血型:AB 家庭成员:妈妈、爸爸、弟弟 (父亲为韩国人,母亲为日本人) 所在学校:龙文高中毕业(见他的时候,他的校服上是龙文,现在已经毕业) 宗教:基督教 从艺经历:1997年饰演电视剧演男主角儿时、2001年可口可乐广告 绰号:诱饵 喜欢的艺人(乐队):Marilyn Manson、Ritchie Blackmore、Jimi Hendrix、Michael Jackson、limp bizkit、X-japan、muse、Avril Lavigne、coldplay 喜欢的歌:micro cut (muse) *********但于2005年11月5日正式离开韩国Trax乐队 J: [J]1:THE TARX 姓名:金英东 Typhoon(Jay Kim) 担任职责:主唱、队长 身高/体重:182 cm/65kg 生日:1984.04.08 血型:B 家庭成员: 妈妈、爸爸、妹妹 mini辑 所在学校:培材大学英文系,目前学习中 喜欢的艺人(乐队):Soundgarden,Muse,Creed,Coldplay,Ratm,Linkinpark,Oasis,Audioslave, Chris Cornell 喜欢的歌:都喜欢 [J]2:档案 原名:郑在英 生日:1978年5月2日 身高:170cm 体重:48kg 学历:美国弗吉尼亚州NOVA音乐学院JAZZ专业(休学) 星路历程: 1995年 当选为华盛顿小姐 1995年 获WEST SPRING FIELD"SHOW TALENT"大奖 1996年 USA "WASHINGTON SONG FESTIVAL"一等奖 1999年 加盟日本BMG唱片公司以J为名发表个人专辑 2000年 代表韩国参加东京召开的“新千年演唱会” 找到的翻唱歌曲: 杜德伟/像自由的风---J/昨日重现 李克勤/爱不坏---J/昨日重现 容祖儿/Goodbye---J/Goodbye 容祖儿/相当刺激---J/影子中的爱情 容祖儿/她狠过你---J/灰 王心凌/On My Way---J/8318 许慧欣/ 突然想起你---J / 昨日一样 萧亚轩/Cappuccino---J/The Very Scent Of You 江映蓉/把握你的美 作曲
2023-07-27 00:34:101

Spring Boot整合ElasticSearch实现增删改查基本示例

ElasticSearch被命名为大数据搜索引擎,在文件检索、数据存储方面具有天然的优势。而SpringBoot作为服务整合中间件,在服务组装方面是一款万能粘合器,本文主要提供Spring Boot整合ElasticSearch基本增删改示例。 ElasticSearch安装过程可参考博主之前笔文: https://www.toutiao.com/i6827758978567504392/ ElasticSearch基本介绍可参考博主之前笔文: https://www.toutiao.com/i6884427730096488971/ Maven工程引入:org.springframework.boot spring-boot-starter-data-elasticsearch注意:ElasticSearch版本号与Spring Boot版本号是有关联的,本文笔者Spring Boot版本号是2.1.6,因此安装的ElasticSearch版本号是7.7.0。 package com.opendi.generator.elasticsearch.model;import lombok.Data; import org.springframework.data.annotation.Id; import org.springframework.data.elasticsearch.annotations.Document; import org.springframework.data.elasticsearch.annotations.Field; import org.springframework.data.elasticsearch.annotations.FieldType;import java.util.List;@Data @Document(indexName="post", type="post",shards=1,replicas = 0) public class Post { @Id private String id;private String title;@Field(type=FieldType.Nested) private List tags; } package com.opendi.generator.model;import lombok.Data;import org.springframework.data.annotation.Id; import org.springframework.data.elasticsearch.annotations.Document; import org.springframework.data.elasticsearch.annotations.Field; import org.springframework.data.elasticsearch.annotations.FieldType;@Data @Document(indexName = "book", type = "_doc", shards = 1, replicas = 0) public class BookBean { @Id private String id; @Field(type = FieldType.Keyword) private String title; @Field(type = FieldType.Keyword) private String author; @Field(type = FieldType.Keyword) private String postDate;public BookBean(){}public BookBean(String id, String title, String author, String postDate){ this.id=id; this.title=title; this.author=author; this.postDate=postDate; }public String getId() { return id; }public void setId(String id) { this.id = id; }public String getTitle() { return title; }public void setTitle(String title) { this.title = title; }public String getAuthor() { return author; }public void setAuthor(String author) { this.author = author; }public String getPostDate() { return postDate; }public void setPostDate(String postDate) { this.postDate = postDate; }@Override public String toString() { return "BookBean{" + "id="" + id + """ + ", title="" + title + """ + ", author="" + author + """ + ", postDate="" + postDate + """ + "}"; } }package com.opendi.generator.elasticsearch.mapper;import com.opendi.generator.elasticsearch.model.Post; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;public interface PostRepository extends ElasticsearchRepository { Page findByTitle(String title, Pageable pageable); } package com.opendi.generator.dao;import com.opendi.generator.model.BookBean; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;/** * 接口关系: * ElasticsearchRepository --> ElasticsearchCrudRepository --> PagingAndSortingRepository --> CrudRepository */ public interface BookRepository extends ElasticsearchRepository { //Optional findById(String id); Page findByAuthor(String author, Pageable pageable); Page findByTitle(String title, Pageable pageable); }使用了ElasticSearch里面的操作工具对数据进行操作。 package com.opendi.generator.elasticsearch.service;import com.opendi.generator.elasticsearch.model.Post; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest;import java.util.Optional;public interface PostService {Post save(Post post);Optional findOne(String id); Iterable findAll(); Page findByTitle(String title, PageRequest pageRequest); } 指定操作对象: package com.opendi.generator.elasticsearch.service.impl;import com.opendi.generator.elasticsearch.mapper.PostRepository; import com.opendi.generator.elasticsearch.model.Post; import com.opendi.generator.elasticsearch.service.PostService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.stereotype.Service;import java.util.Optional;@Service public class PostServiceImpl implements PostService {@Autowired private PostRepository postRepository;@Override public Post save(Post post) { postRepository.save(post); return post; }@Override public Optional findOne(String id) { return postRepository.findById(id); }@Override public Iterable findAll() { return postRepository.findAll(); }@Override public Page findByTitle(String title, PageRequest pageRequest) { return postRepository.findByTitle(title, pageRequest); } } package com.opendi.generator.service;import com.opendi.generator.model.BookBean; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest;import java.util.List; import java.util.Optional;public interface BookService {Optional findById(String id); BookBean save(BookBean blog);void delete(BookBean blog);Optional findOne(String id); List findAll(); Page findByAuthor(String author, PageRequest pageRequest); Page findByTitle(String title, PageRequest pageRequest); }package com.opendi.generator.service.impl;import com.opendi.generator.dao.BookRepository; import com.opendi.generator.model.BookBean; import com.opendi.generator.service.BookService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.stereotype.Service;import java.util.List; import java.util.Optional;@Service("blogService") public class BookServiceImpl implements BookService {@Autowired @Qualifier("bookRepository") private BookRepository bookRepository;@Override public Optional findById(String id) { //CrudRepository中的方法 return bookRepository.findById(id); }@Override public BookBean save(BookBean blog) { return bookRepository.save(blog); }@Override public void delete(BookBean blog) { bookRepository.delete(blog); }@Override public Optional findOne(String id) { return bookRepository.findById(id); }@Override public List findAll() { return (List ) bookRepository.findAll(); }@Override public Page findByAuthor(String author, PageRequest pageRequest) { return bookRepository.findByAuthor(author,pageRequest); }@Override public Page findByTitle(String title, PageRequest pageRequest) { return bookRepository.findByTitle(title,pageRequest); } } 会调用ElasticSearch底层功能进行操作,能够实现ElasticSearch增删改操作。 连接服务器ElasticSearch连接配置: spring: data: elasticsearch: cluster-name: es2018 cluster-nodes: 10.172.8.154:9300 repositories: enabled: true elasticsearch: jest: uris: http:// 10.172.8.154:9200 增加连接配置,这样就能连接ElasticSearch客户端了。 ElasticSearch在Controller操作: package com.opendi.generator.controller;import com.opendi.generator.model.BookBean; import com.opendi.generator.service.BookService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import java.util.Optional;@RestController public class ElasticController { @Autowired private BookService bookService;@RequestMapping("/book/{id}") @ResponseBody public BookBean getBookById(@PathVariable String id){ Optional opt =bookService.findById(id); BookBean book=opt.get(); System.out.println(book); return book; }@RequestMapping("/save") @ResponseBody public void Save(){ System.setProperty("es.set.netty.runtime.available.processors", "false"); BookBean book=new BookBean("1","ES入门教程","程裕强","2018-10-01"); System.out.println(book); bookService.save(book); }}package com.opendi.generator.elasticsearch.controller;import com.opendi.generator.elasticsearch.model.Post; import com.opendi.generator.elasticsearch.model.Tag; import com.opendi.generator.elasticsearch.service.PostService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController;import java.util.ArrayList; import java.util.Arrays; import java.util.List;@Api(tags="ElasticSearch示例") @RestController public class PostController {@Autowired private PostService postService;@ApiOperation(value="得到ES结果") @GetMapping(value="getList") public List<page > getList()</page { List<page > list = new ArrayList<page >();</page </page Tag tag = new Tag(); tag.setId("1"); tag.setName("tech"); Tag tag2 = new Tag(); tag2.setId("2"); tag2.setName("elasticSearch"); Post post = new Post(); post.setId("1"); post.setTitle("This is post"); post.setTags(Arrays.asList(tag,tag2)); postService.save(post); Post post2 = new Post(); post2.setId("2"); post2.setTitle("Biding2"); post2.setTags(Arrays.asList(tag)); postService.save(post2); Page posts = postService.findByTitle("This is post", new PageRequest(0, 10)); Page posts2 = postService.findByTitle("Biding2", new PageRequest(0,10)); Page posts3 = postService.findByTitle("Biding2", new PageRequest(0,10)); list.add(posts); list.add(posts2); list.add(posts3); return list; } } 控制台打印:
2023-07-27 00:34:181

如何通过反射获取Spring scoped bean的所有属性?

这个bean并不是你想要的。。是spring生成的一个代理哈。。 因为这个是代理。。所以还没有创建你真正想要的目标。。也就是说你想要的目标不存在。。所以我觉得没有办法哦。。不过真正的实例是你使用它的时候创建的。。你可以在调用这个方法前先使用一下她。。比如调用一下他的方法。。
2023-07-27 00:34:361

springmvc的form表单的多对象的映射 即modelAttribute="x,x,...." 中方多个对象,求demo

jsp:<form:form modelAttribute="address,product" action="product_save" method="post"> <fieldset> <legend>Add a product</legend> <p> <label for="address">Address:</label> <input type="text" name="city" id="city" value="rrr" tabindex="1"> </P>x <p> <label for="address.name">address.name:</label> <input type="text" name="name" id="name" value="jjjj" tabindex="2"> </p> <p> <label for="product">Product Name: </label> <input type="text" id="product.name" name="product.name" value="kkk" tabindex="3"> </p>java:@RequestMapping(value="/product_save") public String saveProduct(@ModelAttribute("product") Product product, @ModelAttribute("address") Address address,BindingResult bindingResult, Model model) {
2023-07-27 00:34:431

jsp 页面怎么得到spring BindingResult 里面的错误消息

表单 path属性
2023-07-27 00:34:582

springMVC怎么获取前台post过来的对象

1、通过注解方式,能够将jsp对应到form表单action中对应的类中2、在类中进行逻辑操作3、将处理后的结果返回到jsp
2023-07-27 00:35:074

如何把springmvc model 生成pdf文件

本文先叙述,如何操作PDF模板生成PDF文件,再说明在SpringMVC中如何根据PDF模板生成PDF文件。使用PDF模板生成PDF文件需要以下几个步骤:下面按步骤说明:1. 使用Microsoft Office Word画好模板此步骤就不详述了,就是一个普通的Word文件(template.docx)。给个示例截图:2. 使用Adobe Acrobat X Pro将Word文件转换为带表单字段的PDF模板文件1) 打开Adobe Acrobat X Pro2) 选择“创建PDF表单”3) 选择源:(PDF、Word、Excel或其它文件类型),下一步4) 定位Word文件路径,下一步5) Adobe Acrobat X Pro会自动猜测表单字段位置,如图6) 一般生成的表单字段都不符合我们的要求,选中删除即可。7) 点击右键选择文本框,拖动到适当的位置,设置好域名称,字号,字体等。8) 保存模板文件。(template.pdf)3. 使用itext操作PDF模板,填充数据,生成PDF文件1) 需要jar包:itext.jar、itextAsian.jar2) 核心代码:package personal.hutao.test;import java.io.ByteArrayOutputStream;import java.io.FileOutputStream;import java.io.IOException;import java.io.OutputStream;import java.util.HashMap;import java.util.Map;import org.junit.Test;import com.lowagie.text.DocumentException;import com.lowagie.text.pdf.AcroFields;import com.lowagie.text.pdf.PdfReader;import com.lowagie.text.pdf.PdfStamper;public class TestPdf { @Test public void test() throws IOException, DocumentException { String fileName = "D:/template.pdf"; // pdf模板 PdfReader reader = new PdfReader(fileName); ByteArrayOutputStream bos = new ByteArrayOutputStream(); PdfStamper ps = new PdfStamper(reader, bos); AcroFields fields = ps.getAcroFields(); fillData(fields, data()); ps.setFormFlattening(true); ps.close(); OutputStream fos = new FileOutputStream("D:/contract.pdf"); fos.write(bos.toByteArray());} public void fillData(AcroFields fields, Map<String, String> data) throws IOException, DocumentException { for (String key : data.keySet()) { String value = data.get(key); fields.setField(key, value); } } public Map<String, String> data() { Map<String, String> data = new HashMap<String, String>(); data.put("borrower", "胡桃同学"); return data; }}3) 打开contract.pdf,如图至此,就实现了根据PDF模板生成PDF文件。SpringMVC的视图中已提供了对PDF模板文件的支持:org.springframework.web.servlet.view.document.AbstractPdfStamperView。那么只需要配置好此视图就可以了。具体分为以下步骤:1) 实现抽象类 AbstractPdfStamperViewpackage personal.hutao.view;import java.io.IOException;import java.util.Map;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.springframework.web.servlet.view.document.AbstractPdfStamperView;import com.lowagie.text.DocumentException;import com.lowagie.text.pdf.AcroFields;import com.lowagie.text.pdf.PdfStamper;public class PdfStamperView extends AbstractPdfStamperView { public static final String DATA = "data"; public static final String FILENAME = "mergePdfFileName"; @SuppressWarnings("unchecked") @Override protected void mergePdfDocument(Map<String, Object> model, PdfStamper stamper, HttpServletRequest request, HttpServletResponse response) throws Exception { response.setHeader("Content-Disposition", "attachment;filename=" + new String(model.get(FILENAME).toString().getBytes(), "ISO8859-1")); AcroFields fields = stamper.getAcroFields(); fillData(fields, (Map<String, String>) model.get(DATA)); stamper.setFormFlattening(true); } private void fillData(AcroFields fields, Map<String, String> data) throws IOException, DocumentException { for (String key : data.keySet()) { String value = data.get(key); fields.setField(key, value); } }}2) 在SpringMVC的配置文件中配置视图<!-- 按照BeanName解析视图 --><bean class="org.springframework.web.servlet.view.BeanNameViewResolver"> <property name="order" value="1" /></bean><!-- 定义Pdf模版视图 --><bean id="contract" class="personal.hutao.view.PdfStamperView"> <property name="url" value="/WEB-INF/template/template.pdf" /></bean>3) Controller中的业务逻辑处理package personal.hutao.controller;import static personal.hutao.view.PdfStamperView.DATA;import static personal.hutao.view.PdfStamperView.FILENAME;import java.util.HashMap;import java.util.Map;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.springframework.web.bind.annotation.RequestMapping;import com.coamctech.sample.commons.controller.BaseController;@RequestMapping("/contract")@Controllerpublic class TestController { @RequestMapping("/export/pdf") public String exportPersonalCreaditLoanContract(Model model) { model.addAttribute(DATA, data()); model.addAttribute(FILENAME, "XXX贷款合同"); return "contract"; } private Map<String, String> data() { Map<String, String> data = new HashMap<String, String>(); data.put("borrower", "胡桃同学"); return data; }}
2023-07-27 00:35:151

spring security 中验证码的实现,当验证码不正确的时候,页面会跳转至500错误页面。

有三中方法可以实现验证码的功能第一种是自定义一个filter,放在SpringSecurity过滤器之前,在用户登录的时候会先经过这个filter,然后在这个filter中实现对验证码进行验证的功能,这种方法不推荐,因为它已经脱离了SpringSecurity第二种是自定义一个filter让它继承自UsernamePasswordAuthenticationFilter,然后重写attemptAuthentication方法在这个方法中实现验证码的功能,如果验证码错误就抛出一个继承自AuthenticationException的验证吗错误的异常比如(CaptchaException),然后这个异常就会被SpringSecurity捕获到并将异常信息返回到前台,这种实现起来比较简单[java] view plain copy @Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException { String requestCaptcha = request.getParameter(this.getCaptchaFieldName()); String genCaptcha = (String)request.getSession().getAttribute("code"); logger.info("开始校验验证码,生成的验证码为:"+genCaptcha+" ,输入的验证码为:"+requestCaptcha); if( !genCaptcha.equals(requestCaptcha)){ throw new CaptchaException( this.messageSource.getMessage("AbstractUserDetailsAuthenticationProvider.badCaptcha",null,"Default",null)); } return super.attemptAuthentication(request, response); } 然后在配置文件中配置下[html] view plain copy <bean id="loginFilter" class="com.zrhis.system.security.DefaultUsernamePasswordAuthenticationFilter"> <property name="authenticationManager" ref="authenticationManager"></property> <property name="authenticationSuccessHandler"> <bean class="org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler"> <property name="defaultTargetUrl" value="/index.jsp"></property> </bean> </property> <property name="authenticationFailureHandler"> <bean class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler"> <property name="defaultFailureUrl" value="/login.jsp"></property> </bean> </property> </bean> 最后在http中加入custom-filter配置,将这个filter放在SpringSecurity的FORM_LOGIN_FILTER之前[html] view plain copy <custom-filter ref="loginFilter" before="FORM_LOGIN_FILTER"/> 最后一种是直接替换掉SpringSecurity的UsernamePasswordAuthenticationFilter,这种比较复杂,但是更为合理,也是我现在正在用的。如果用这种方法那么http 中的auto-config就必须去掉,而form-login配置也必须去掉,因为这个不需要了,里面的属性都需要我们自行注入。首先需要创建一个EntryPoint[html] view plain copy <bean id="authenticationEntryPoint" class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint"> <property name="loginFormUrl" value="/login.jsp" /> </bean> 然后在http中配置下[html] view plain copy <sec:http access-decision-manager-ref="accessDecisionManager" entry-point-ref="authenticationEntryPoint"> 然后我们来写CaptchaAuthenticationFilter,同样需要继承自UsernamePasswordAuthenticationFilter[java] view plain copy public class CaptchaAuthenticationFilter extends UsernamePasswordAuthenticationFilter{ public static final String SPRING_SECURITY_FORM_CAPTCHA_KEY = "j_captcha"; public static final String SESSION_GENERATED_CAPTCHA_KEY = Constant.SESSION_GENERATED_CAPTCHA_KEY; private String captchaParameter = SPRING_SECURITY_FORM_CAPTCHA_KEY; public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException { String genCode = this.obtainGeneratedCaptcha(request); String inputCode = this.obtainCaptcha(request); if(genCode == null) throw new CaptchaException(this.messages.getMessage("LoginAuthentication.captchaInvalid")); if(!genCode.equalsIgnoreCase(inputCode)){ throw new CaptchaException(this.messages.getMessage("LoginAuthentication.captchaNotEquals")); } return super.attemptAuthentication(request, response); } protected String obtainCaptcha(HttpServletRequest request){ return request.getParameter(this.captchaParameter); } protected String obtainGeneratedCaptcha (HttpServletRequest request){ return (String)request.getSession().getAttribute(SESSION_GENERATED_CAPTCHA_KEY); } } 在配置文件中配置CaptchaAuthenticationFilter[html] view plain copy <bean id="captchaAuthenticaionFilter" class="com.zrhis.system.security.CaptchaAuthenticationFilter"> <property name="authenticationManager" ref="authenticationManager" /> <property name="authenticationFailureHandler" ref="authenticationFailureHandler" /> <property name="authenticationSuccessHandler" ref="authenticationSuccessHandler" /> <property name="filterProcessesUrl" value="/login.do" /> </bean> <bean id="authenticationSuccessHandler" class="com.zrhis.system.security.SimpleLoginSuccessHandler"> <property name="defaultTargetUrl" value="/WEB-INF/app.jsp"></property> <property name="forwardToDestination" value="true"></property> </bean> <bean id="authenticationFailureHandler" class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler"> <property name="defaultFailureUrl" value="/login.jsp" /> </bean> 从配置文件中就可以看出来authenticationManager、authenticationFailureHandler、authenticationSuccessHandler、filterProcessesUrl等都需要我们自行注入了。filterProcessesUrl定义的是登录验证的地址,默认的是j_spring_security_check这里我们改成login.doauthenticationSuccessHandler中的defaultTargetUrl定义的是登录成功后跳转到的页面authenticationFailureHandler中的defaultTargetUrl定义的是登录失败后跳转到的页面我们的首页app.jsp在/WEB-INF下所以需要使用服务器跳转,所以需要将forwardToDestination设为true,因为客户端跳转是不能直接访问WEB-INF下的内容的。最后在http中将FORM_LOGIN_FILTER替换掉,最终http中完整的配置就变成了下面的内容[html] view plain copy <sec:http access-decision-manager-ref="accessDecisionManager" entry-point-ref="authenticationEntryPoint"> <sec:access-denied-handler ref="accessDeniedHandler"/> <sec:session-management invalid-session-url="/login.jsp" /> <sec:custom-filter ref="filterSecurityInterceptor" before="FILTER_SECURITY_INTERCEPTOR"/> <sec:custom-filter ref="captchaAuthenticaionFilter" position="FORM_LOGIN_FILTER"/> </sec:http> custom-filter中before是在这个filter之前,after是之后,position是替换。
2023-07-27 00:35:231

使用MultipartFile文件上传问题

form加上enctype="multipart/form-data"
2023-07-27 00:35:302

org.springframework.beans.factory.BeanCreationException: Error creating bean with

"studentController" 中spring的一些注入的有问题吧。
2023-07-27 00:35:502

各位哥哥姐姐跪求Spring is coming的英语作文

Spring is coming. What a nice season! The weather is getting warmer and warmer. The flowers are coming out. How beautiful the world is! Look around, the sky is blue and the leaves on the trees are turning green. The sun is shining brightly and the air is so fresh, now everyone takes off his warm coat and is more active than before. We all have good feelings. I must say, be careful not to catch cold again. A good beginning is half done and it"s the first season in the year. We must make the best use of our time and catch every second to work and study. Do you think so?行么
2023-07-27 00:36:092

描写春天优美英语句子

描写春天优美英语句子   导语:冬爷爷刚走,春姑娘就提着百花篮,伴着春风,带着春雨,悄悄地来到了人间,顿时,大地万物复苏,乌语花香,呈现出一派生气。以下是我收集整理的描写春天优美英语句子,希望对您有所帮助。   1、我们的春季像一位画家,涂满了蓬勃的色彩。   Our spring is like a painter who is full of vigorous colors.   2、春天到了,山朗润起来了,水涨起来了,太阳的脸红起来了。   Spring, long run up the mountain, the water rose up, the sun blushed.   3、春天来了!你看万紫千红的花开了,把可爱的草,树木,鸟,兽,虫,鱼。   Spring is coming! You see a riot of colour of the flowers, the lovely grass, trees, birds, beasts, insects, fish.   4、我们热爱春天,是因为春天充满了生机,充满了新的希望!   We love spring, because spring is full of vitality and full of new hope.   5、春天,在河水中,一只只小蝌蝌顽皮地游着,好像在找它的妈妈,可爱极了。   In the spring, the river, only a naughty little tadpole swam, as if looking for its mother, very cute.   6、春天的人间,顿时,大地万物复苏,乌语花香,呈现出一派生气。   The world of spring suddenly revival of the earth and the fragrance of the black language.   7、布谷鸟在春天的舞台上,奏响了一支美妙动听的乐曲。   The cuckoo in the spring on the stage, playing a wonderful music.   8、春天的雨是柔和的,只见春雨在竹枝、竹叶上跳动着。   Is a gentle spring rain, and the rain was beating in the bamboo, bamboo leaves.   9、天气突变,春雨淅淅沥沥地下起来。   The weather changed, xixilili spring up underground.   10、春光明媚,春意盎然,绿茵遍野,嫩草像绿宝石一般发出悦目的光彩。   Bright spring days, Spring is in the air., green everywhere, like a beautiful emerald grass.   11、春姑娘来到人间,为大地披上绿衣。   Spring girl came to the earth, the earth covered with green.   12、新春的太阳还不十分暖,可是一片晴光增加了大家心中的与身上的热力。   The spring sun is not very warm, but a light increases your heart and body of the heat.   13、布谷鸟在清彻透亮的田间歌唱,娇艳的杜鹃花在躁动不安的春风里献媚。   Cuckoo singing in the field clear, beautiful azaleas flatter in restless spring.   14、田野上,麦苗返青,一望无边,仿佛绿色的波浪。   The wheat fields, vast expanse of green, as if the green wave.   15、春天的景色真美啊!空气真清新,我爱这里的春天。   Spring scenery is really beautiful ah! The air is so fresh, I love the spring here.   16、春天来了,带着它特有的声音,轻迈碎步,缓缓而来。   Spring came, with its unique sound, light to slowly come then.   17、春天的风是轻柔的,像妈妈的双手抚摸孩子的脸。   Spring wind is gentle, like the mother"s hands to touch the child"s face.   18、眉叶细,舞腰轻。宿妆成。一春芳意,三月如风,牵系人情。   Eyebrow thin, dance waist. Su Zhuangcheng. A Chun Fang, March wind, set.   19、柳树抽出了细细的柳丝,上面缀洁了淡黄色的嫩叶。   Willow out a thin, top decorated with a pale yellow leaves clean.   20、一切都象刚睡醒的样子,欣欣然张开了眼。   All look like just waking up, joyfully to open the eyes.   21、柳树的枝条向下垂着,就像一条条线挂在树上。   The branches of the willows hang down, just like a line hanging on a tree.   22、河面的雪融化了,雪水汇成小溪,淙淙地流着。   The snow melted snow, Huicheng streams, gurgling stream.   23、春季像一首瑰丽的诗,如梦般甜蜜,如酒般香醇。   Spring is like a beautiful poem, dream like sweet, mellow as a wine.   24、生物在春晨中醒来,展示着生命的可贵、诱人。   Life in the spring morning wake up, showing the value of life, attractive.   25、远处的群山连绵起伏,变得苍绿了。   The distant mountains rolling, pale green.   26、长堤上种满了桃树和柳树。一到春天,堤上桃红柳绿,如同一条锦带。   The causeway is full of peach and willow. In the spring, on the banks of the pink, like a ribbon.   27、这春天,既给人以新的生命,也给人以新的希望,我爱这美丽的春天。   This spring, not only to give people a new life, but also give new hope, I love this beautiful spring.   28、山桃花展瓣吐蕊,杏花闹上枝头,梨花争奇斗艳。   Mountain peach blossoming apricot go show petal, pear trees, flowers.   29、暮春时节,正是满树的花吐蕊飘香的时候,那四溢的清香,的确令人陶醉。   The spring season, it is a tree full of flowers TuRui fragrance, the fragrance overflowing, really intoxicated.   30、蜜蜂嗡嗡地飞来飞去,忙着采花酿蜜。   The bees buzzing, busy flowers honey.   31、春天来了,万物从沉睡中苏醒,青草、树木开始抽出嫩芽。   Spring is coming, everything from slumber, the grass, the trees begin to bud out.   32、小草偷偷地从土地里钻出来,嫩嫩的,绿绿的。风轻悄悄的,草软绵绵的。   The grass grow from the land, tender, green. The wind is soft and soft, and the grass is soft.   33、碧绿的小草开满树旁,就像是树的毯子似的。   The green grass covered with trees, is like a tree like a blanket.   34、春,还像一个调皮的孩子,用他的眼泪,变成了春雨。   Spring, but also like a naughty child, with his tears, into the spring rain.   35、夹在柳树中间的桃树也开出了鲜艳的花朵,绿的柳,红的花,真是美极了!   Caught in the middle of the peach tree willows also open bright flowers, green willow, red flowers, is really beautiful!   36、春天真是让人舒服的春天,春天的景色真美啊!   Spring is really comfortable spring, spring scenery is really beautiful ah!   37、迎着和煦的春风,青蛙打了个哈欠,伸了个懒腰,走出家门。   In the gentle spring breeze, the frog yawned and stretched out of the house.   38、春天,万物奏起了一曲令人心旷神怡的交响曲!   Spring, all played a delightful symphony!   39、小草开始发芽了,大地上到处都显现出欣欣向荣的景象。   The grass began to sprout, and the earth was everywhere.   40、春天来了,大地上的每一个角落者充满了春天的气息。   Spring is coming, every corner of the earth is filled with the breath of spring.   41、春天打扮的花枝招展的微笑的向我们走来。   Spring dressed to the nines smiling to us.   42、我热爱春天,我喜欢闻到花儿的芳香,看到大树的新绿,听到小乌的欢唱。   I love spring, I love to smell the fragrance of flowers, see the tree"s green, listening to the songs of birds.   43、春天像刚落地的娃娃,从头到脚都是新的,它生长着。   Spring is like a newly born baby, it is new from head to toe.   44、身上长满很软的小毛,像一只只毛毛虫真有趣。   The body is covered with soft hairs, like a caterpillar is really interesting.   45、春天戴着花冠,披着绿裳,踏着彩霞,兴致勃勃地到来了。   Spring wearing a crown, dressed in green clothes, with rosy clouds, in the best of spirits is coming.   46、春天真的来了,在池塘里,在田野上,在天空中,到处都焕发着勃勃生机。   Spring is coming, in the pond, in the field, in the sky, everywhere is full of vigor and vitality.   47、娇艳的杜鹃花在躁动不安的春风里献媚。布谷鸟在清彻透亮的田间歌唱。   The beautiful azaleas flatter in restless spring. Cuckoo singing in the field is clear and the.   48、春天像位爱美的姑娘,让世界姹紫嫣红。   Spring is like a beauty girl, let the world brilliant purples and reds.   49、春天是一个富有生命力的季节,也是一个美丽神奇,充满希望的季节。   Spring is a full of vitality of the season, is also a beautiful and magical, hopeful season.   50、一眼望去,到处都是一片绿景象,就像一幅水彩画。   At a glance, everywhere is a piece of green, like a watercolor painting.   51、盼望着,盼望着,东风来了,春天的脚步近了。   Looking forward to, looking forward to, the wind came, the footsteps of spring near.   52、春晚绿野秀,岩高白云屯春游--东风知我欲山,吹断檐间积雨声。   The Spring Festival evening show green, East Rock High - I want to know the spring Tun Baiyun Mountain, blow off the product between the rain.   53、桃红柳绿的春天,花繁叶茂的夏天,枫红菊香的秋天,松青雪白的冬天。   The colorful spring, summer andflourishing, red maple chrysanthemum autumn, winter is white pine green.   54、春天来了,春风吹绿了小草,吹开了小花。多美的春光啊!   Spring has come, the spring breeze blowing green grass, blowing the flowers. What a beautiful spring ah!   55、春天的.江南是美丽的,风很柔和,空气很清新,太阳很温暖。   Spring of the south is beautiful, the wind is very soft, the air is fresh, the sun is very warm.   56、踩在她松软的泥土上,才知道生命的温床可以如此地平实,只要季节的老。   Step in her soft soil, the only know life can be such a hotbed of earth, as long as the old season.   57、春姑娘带着春天的问候悄然无息的来了。   Spring girl with the greetings of spring quietly come.   58、春天像小姑娘,花枝招展的,笑着,走着。   Spring is like a little girl, dressed, smiling and walking.   59、冬爷爷送走了大地的严寒,春姑娘踏着轻盈的脚步来到了人间。   Grandpa winter off the cold spring, the footsteps of the girl came to the earth.   60、春天的夜晚,淡月笼纱,娉娉婷婷。有风拂过脸颊,掠起长发。   Spring night, Danyue cage yarn, Ping Ping ting. The wind blowing over the cheek, swept hair.   61、春天的景色太美了,春天里人们的心情更美。   Spring scenery is too beautiful, people"s mood is more beautiful in spring.   62、春秋满四泽,夏云多奇峰,秋月扬明辉,冬岭秀孤松。   The spring and autumn full size, summer cloud multi peaks, moon bright winter Yang, Ling Xiu pine.   63、然的神奇歌手,唱着清脆悦耳的歌,向前奔流。   However, the amazing singer, singing clear and melodious song, forward.   64、春雨,像春姑娘纺出的线,轻轻地落到地上,沙沙沙,沙沙沙。   Spring rain, like the spring girl spun out of the line, gently fell to the ground, sand, sand, sand.   65、桃树杏树梨树,红的像火,粉的像霞,白的像雪。   Peach and apricot pear, red as fire, as the Xia powder, white as snow.   66、春,就像一个美丽的仙女,轻轻地轻轻地,把所有的生物都叫醒了。   Spring, like a beautiful fairy, gently and gently, all the creatures are awakened.   67、春风一吹,它们就左右摇摆,好像在给春风点头呢,有趣极了。   The spring breeze blows, they seem to sway in the spring breeze nod, very interesting.   68、春天的一个傍晚,我外出散步,忽然觉得自己被笼罩在一种奇丽的景色之中。   A spring evening, I went out for a walk, suddenly feel that they are shrouded in a beautiful scenery.   69、春天来了,肥胖的小叶儿,像一个个刚刚睡醒的胖娃娃。   Spring is coming. Fat lobules are like dolls just waking up.   70、春天里,近处山坡上的小草也悄悄地钻出地面,它们嫩生生,绿油油的。   In the spring, near the hillside grass quietly drilled the ground, they are very tender, green. ;
2023-07-27 00:36:241

在一个网页的系统,数据录入的时候出现: PreparedStatementCallback; bad SQL grammar

插入的sql语句有问题,好好检查一下 比如数据库设定的类型与插入的类型是否一致, 存不存在小类型下 插入了大类型的值
2023-07-27 00:36:401

跪求大神:Could not autowire field: private com.mvc.service.StudentService com.mvc.controller.Stud

spring 配置文件 的 bean 自动注入失败! 你可以考虑 用 构造器<constructor-arg 注入 或者是 Set 注入,试试!
2023-07-27 00:36:552

写一篇建设建设绿色美丽的广西玉林英语作文

的家乡(玉林) 英语作文300字左右My hometown in YuLin,which is a very beautiful place.There beautiful like paradise on earth.Spring blossom when I opened the door to see the mountains and plains of the flowers were blooming.Seeing the beautiful scene,I can not wait to become a little bee flying once the flowers,and flowers a while to say something whispering; while playing hide and seek game,and flowers; a while,and bathed with the flowers of spring sunshine.Field is full of hard figure,farmers uncle with sweats with the field,sowing the seeds.Summer,I opened the window,can see the mountain from afar attached Mountain,the mountain forests to mountain dyed emerald green,like a mountain wearing a green dress.Can not hear the water singing when the voice,as if urging me to quickly and partners to stream swimming.The thought here,I Annaibuzhu excitement,immediately about the number of partners to a small river,the river like a mirror,the reflection in the blue sky blue water,lush green mountains also reflection on the water,the We set off more beautiful smile.We lined up,only to hear my command,"jump",we like a little frog just jumped into the river like a thump thump.We also travel Huan than fish,like a dragon of the same article over and over again in the water.Our laughter echoed in the valleys.Fall,every household in the fruit are mature.Golden wheat lower the little face,as if the well water to its farmers uncle thanks.This proved a poem:"Spring kind of a grain,the Autumn Harvest 10 000 seeds." Jujube tree in my yard is also a big bear fruit,as long as the beating with bamboo sticks jujube,this time as it began to rain generally dates ,islets are falling down,and that the dates can be sweet.In winter,the snow goose feather to the field covered with a white blanket,to bring up a mountain snow-white hat,to the woods wearing a white jacket,lit a lot of this mountain village.Then I felt breath is Ice,the whole is frozen like a normal person.I quickly hid in the fire barrel,immediately felt a pang of warmth hit,very badly!I saw the smoke slowly rising home repeatedly that cloud in the call; I saw the light of the flowing river home,and that is the sea calling her mother; I saw the bird free to fly home,it is natural call.This is my hometown,it is so beautiful,it"s handsome.这个你看看行不行,
2023-07-27 00:37:091

请向朋友介绍一处值得去的地方英语作文

Sure, I"d be happy to introduce you to a beautiful place that is worth your time. It"s called nature"s garden, and it"s located in my hometown.Nature"s garden is a beautiful park with a large garden area, trees, flowers, and a lake. The park is very peaceful and serene, and it"s a great place to relax and enjoy the beauty of nature. You can take a walk, picnic, and enjoy the fresh air. The park also has a visitor center where you can learn about the history of the park and its animals.Another great thing about nature"s garden is that it"s close to my home. I can easily go there on my own or with friends and enjoy the scenery. The park is also a great place to bring children because there are plenty of activities and games to play.In conclusion, nature"s garden is a beautiful and值去的地方. It"s a peaceful park with a lot of opportunities for outdoor activities, and it"s close to my hometown. I highly recommend that you go there and experience it for yourself.
2023-07-27 00:37:192

spring是几月?

1.Spring is the first season of a year.春天是一年中的第一个季节。2.Spring is a delightful season.春天是个让人欣喜的季节。3.The temperatures are moderate, and the blooming trees and flowers make the city bright with colors.春天气温适中,挂满绿叶的树和盛开的花朵给城市增添了明亮的色彩。4.Field,flower garden,the forest have a girl left behind traces of the spring.田野上,花圃上,森林里都有着春姑娘留下足迹。5.The breeze blowing,a fresh,delicate fragrance,elegant earthy oncoming.微风吹来,一阵清新、幽香、淡雅的泥土气息迎面而来。
2023-07-27 00:37:431

关于春天、夏天、秋天和冬天的英语单词

j90=uuurhtjihsxirhoprjtiosgjuirehurhyryhge8d7rtg
2023-07-27 00:38:0710

java添加一个dao部署失败,试用@autowired,[ERROR] DispatcherServlet - Context initialization failed

非法参数错误,注入hibernate对象的时候出错了
2023-07-27 00:38:311

用英语描述一下春天(五句话)

Spring is warm.The flowers blossom.The trees sprout.The river milts.Everything has already reborned.
2023-07-27 00:38:493

We play hockey on the field怎么变成特殊疑问句?

Where do you play hochey?
2023-07-27 00:39:216

a lot of studentsare having all kinds of sports on thesports field 的那个短文

A lot of students are having all kinds of sports on the sports field. A football game is going on right now between Class 3 and Class 4. We don"t know which team will win. Look at those people over there! Some students of Class 1 are practicing the high jump. One of them is the best high jumper in the school. He practices hard every day. Many people think he will break the school record (记录) in the sports meet next spring. Not far away from them, some girls are preparing for a race. They will have a 600-meter race in ten minutes. Now on the corner of the field, you can see another group (群) of students. Their teacher is telling them how to throw discus (铁饼).In schools, more and more students love sports now. Sports help people to keep healthy. They also help people to live happily. And after doing sports on the sports field, many people will become good friends, too. Do you think so?许多学生正在运动场上进行各项运动。一场三班与四班的足球赛正在进行,我们不知道哪一队会赢。看看那边的人群!一班的一些学生正在练习跳高。他们中有一个学生是全校跳高最好的,他每天练的非常辛苦,许多人认为他将在明年春季运动会上打破校记录。离他们不远,一些女生正在准备赛跑,她们将进行十分钟600米跑。现在在场地的角落里,你可以看见另一群学生,他们的老师正在教他们如何扔铁饼。现在在各个学校越来越多的学生热爱运动。运动能使人保持健康。运动也使人生活快乐。在运动场进行完运动后,许多人也都将成为好朋友,你认为呢?
2023-07-27 00:39:371

兰州旅游景点的英语介绍

The sculpture Huanghe River mother [Lanzhou] is located in Lan Zhou City Huanghe River south coast shore river road middle piece , small the West Lake park north oblique tones, that sculpture work of art middle is the most beautiful one of mother river- - Huanghe River being that the whole nation is at present a lot of show the Chinese nation. Have very high artistic value, the scheme compares and assesses middle Zeng ... in the whole nation head session of city sculpture放心采纳
2023-07-27 00:39:464

每一年都有什么节日

还有9月第三周是推广普通话日
2023-07-27 00:40:107

如何在spring中配置定时任务

一、在web.xml文件中进行如下配置: <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/classes/applicationContext-*.xml </param-value> </context-param>那么需要在工程下创建一个以applicationContext- 为开头的xml文件eg:applicationContext-jobconfig.xmlxml的头和结尾部分跟其他spring配置文件相似,就不赘述,正文如下: <bean id="youJobName(类别名)" class="com.******.YourJobClassLocation(类的定位)" /> <bean id="doYourJob(别名)" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <property name="targetObject"> <ref bean="youJobName(类别名)""/> </property> <property name="targetMethod"> <value>runMethodName(定时执行的方法名)</value> </property> </bean> <bean id="youJobNameTrigger(触发器别名)" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail"> <ref bean="doYourJob(别名)""/> </property> <property name="cronExpression"> <value>0 0/20 * * * ?(定时的时间配置)</value> </property> </bean> <bean id="doScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list> <ref local="youJobNameTrigger(触发器别名)"/> </list> </property> </bean>这样的配置几本就可以运转了,但是有一个地方可能是你需要根据你的需求来确定的,那就是触发时间。下面有一些关于时间配置的说明: <value>0 0/20 * * * ?</value>按顺序 <value> 秒 分 小时 日期 月份 星期 年 </value>字段顺序允许值允许的特殊字符秒 0-59 , - * / 分 0-59 , - * / 小时 0-23 , - * / 日期 1-31 , - * ? / L W C 月份 1-12 或者 JAN-DEC , - * / 星期 1-7 或者 SUN-SAT , - * ? / L C # 年(可选) 留空, 1970-2099 , - * / The "*" character is used to specify all values. For example, "*" in the minute field means "every minute". “*”字符被用来指定所有的值。如:”*“在分钟的字段域里表示“每分钟”。 The "?" character is allowed for the day-of-month and day-of-week fields. It is used to specify "no specific value". This is useful when you need to specify something in one of the two fileds, but not the other. See the examples below for clarification. “?”字符只在日期域和星期域中使用。它被用来指定“非明确的值”。当你需要通过在这两个域中的一个来指定一些东西的时候,它是有用的。看下面的例子你就会明白。 月份中的日期和星期中的日期这两个元素时互斥的一起应该通过设置一个问号(?)来表明不想设置那个字段The "-" character is used to specify ranges For example "10-12" in the hour field means "the hours 10, 11 and 12". “-”字符被用来指定一个范围。如:“10-12”在小时域意味着“10点、11点、12点”。 The "," character is used to specify additional values. For example "MON,WED,FRI" in the day-of-week field means "the days Monday, Wednesday, and Friday". “,”字符被用来指定另外的值。如:“MON,WED,FRI”在星期域里表示”星期一、星期三、星期五”. The "/" character is used to specify increments. For example "0/15" in the seconds field means "the seconds 0, 15, 30, and 45". And "5/15" in the seconds field means "the seconds 5, 20, 35, and 50". Specifying "*" before the "/" is equivalent to specifying 0 is the value to start with. Essentially, for each field in the expression, there is a set of numbers that can be turned on or off. For seconds and minutes, the numbers range from 0 to 59. For hours 0 to 23, for days of the month 0 to 31, and for months 1 to 12. The "/" character simply helps you turn on every "nth" value in the given set. Thus "7/6" in the month field only turns on month "7", it does NOT mean every 6th month, please note that subtlety."/"字符用来指定渐增的值。例如0/15出现在秒字段的时候意味着“在第0,15,30和45秒”(的时候被触发)。而5/15出现在秒字段的时候意味着“在第5,20,35和第50秒”(的时候被触发)。"*/"和"0/"的指定是等价的。注:当分子+分母的值大于该字段的最大值,如在秒钟字段出现45/20的时候,表示在第45秒以后的每20会触发一次,但是20秒以后又算做另外的时间段以内了,所以该字段的/20即失效,如改为45/10 则只有 第45 和55秒会执行一次。The "L" character is allowed for the day-of-month and day-of-week fields. This character is short-hand for "last", but it has different meaning in each of the two fields. For example, the value "L" in the day-of-month field means "the last day of the month" - day 31 for January, day 28 for February on non-leap years. If used in the day-of-week field by itself, it simply means "7" or "SAT". But if used in the day-of-week field after another value, it means "the last xxx day of the month" - for example "6L" means "the last friday of the month". When using the "L" option, it is important not to specify lists, or ranges of values, as you"ll get confusing results. L是‘last"的省略写法可以表示day-of-month和day-of-week域,但在两个字段中的意思不同,例如day-of-month域中表示一个月的最后一天,如果在day-of-week域表示‘7"或者‘SAT",如果在day-of-week域中前面加上数字,它表示一个月的最后几天,例如‘6L"就表示一个月的最后一个星期五,The "W" character is allowed for the day-of-month field. This character is used to specify the weekday (Monday-Friday) nearest the given day. As an example, if you were to specify "15W" as the value for the day-of-month field, the meaning is: "the nearest weekday to the 15th of the month". So if the 15th is a Saturday, the trigger will fire on Friday the 14th. If the 15th is a Sunday, the trigger will fire on Monday the 16th. If the 15th is a Tuesday, then it will fire on Tuesday the 15th. However if you specify "1W" as the value for day-of-month, and the 1st is a Saturday, the trigger will fire on Monday the 3rd, as it will not "jump" over the boundary of a month"s days. The "W" character can only be specified when the day-of-month is a single day, not a range or list of days. The "L" and "W" characters can also be combined for the day-of-month expression to yield "LW", which translates to "last weekday of the month". The "#" character is allowed for the day-of-week field. This character is used to specify "the nth" XXX day of the month. For example, the value of "6#3" in the day-of-week field means the third Friday of the month (day 6 = Friday and "#3" = the 3rd one in the month). Other examples: "2#1" = the first Monday of the month and "4#5" = the fifth Wednesday of the month. Note that if you specify "#5" and there is not 5 of the given day-of-week in the month, then no firing will occur that month. The "C" character is allowed for the day-of-month and day-of-week fields. This character is short-hand for "calendar". This means values are calculated against the associated calendar, if any. If no calendar is associated, then it is equivalent to having an all-inclusive calendar. A value of "5C" in the day-of-month field means "the first day included by the calendar on or after the 5th". A value of "1C" in the day-of-week field means "the first day included by the calendar on or after sunday". 关于cronExpression的介绍:  字段 允许值 允许的特殊字符 秒 0-59 , - * / 分 0-59 , - * / 小时 0-23 , - * / 日期 1-31 , - * ? / L W C 月份 1-12 或者 JAN-DEC , - * / 星期 1-7 或者 SUN-SAT , - * ? / L C # 年(可选) 留空, 1970-2099 , - * / 表达式意义 "0 0 12 * * ?" 每天中午12点触发 "0 15 10 ? * *" 每天上午10:15触发 "0 15 10 * * ?" 每天上午10:15触发 "0 15 10 * * ? *" 每天上午10:15触发 "0 15 10 * * ? 2005" 2005年的每天上午10:15触发 "0 * 14 * * ?" 在每天下午2点到下午2:59期间的每1分钟触发 "0 0/5 14 * * ?" 在每天下午2点到下午2:55期间的每5分钟触发 "0 0/5 14,18 * * ?" 在每天下午2点到2:55期间和下午6点到6:55期间的每5分钟触发 "0 0-5 14 * * ?" 在每天下午2点到下午2:05期间的每1分钟触发 "0 10,44 14 ? 3 WED" 每年三月的星期三的下午2:10和2:44触发 "0 15 10 ? * MON-FRI" 周一至周五的上午10:15触发 "0 15 10 15 * ?" 每月15日上午10:15触发 "0 15 10 L * ?" 每月最后一日的上午10:15触发 "0 15 10 ? * 6L" 每月的最后一个星期五上午10:15触发 "0 15 10 ? * 6L 2002-2005" 2002年至2005年的每月的最后一个星期五上午10:15触发 "0 15 10 ? * 6#3" 每月的第三个星期五上午10:15触发 每天早上6点 0 6 * * * 每两个小时 0 */2 * * * 晚上11点到早上7点之间每两个小时,早上八点 0 23-7/2,8 * * * 每个月的4号和每个礼拜的礼拜一到礼拜三的早上11点 0 11 4 * 1-3 1月1日早上4点 0 4 1 1 *quartz的高级特性不仅如此 1 数据库存储 2 集群支持 3 数据库持久化任务,trigger 4 trigger 的停止,运行 5 任务的任意添加 6 比corntrigger 更详尽的任务安排 7 线程的内部数据交换
2023-07-27 00:40:371

jsp 页面怎么得到spring BindingResult 里面的错误消息

 List<FieldError> err=result.getFieldErrors(); FieldError fe; String field; String errorMessage; for (int i = 0; i < err.size(); i++) { fe=err.get(i); field=fe.getField();//得到那个字段验证出错 errorMessage=fe.getDefaultMessage();//得到错误消息 System.out.println("错误字段消息:"+field +" : "+errorMessage); } // 打印结果
2023-07-27 00:40:452

spring的翻译和解释是什么意思?

1.Spring is the first season of a year.春天是一年中的第一个季节。2.Spring is a delightful season.春天是个让人欣喜的季节。3.The temperatures are moderate, and the blooming trees and flowers make the city bright with colors.春天气温适中,挂满绿叶的树和盛开的花朵给城市增添了明亮的色彩。4.Field,flower garden,the forest have a girl left behind traces of the spring.田野上,花圃上,森林里都有着春姑娘留下足迹。5.The breeze blowing,a fresh,delicate fragrance,elegant earthy oncoming.微风吹来,一阵清新、幽香、淡雅的泥土气息迎面而来。
2023-07-27 00:40:521

Spring is a good season to fly kites. You can fly your kites in the park, in the field or on th...

小题1:C小题2:D小题3:B小题4:C小题5:A 小题1:细节理解题,根据文中语句“Spring is a good season to fly kites. You can fly your kites in the park, in the field or on the play ground.”理解可知。小题2:细节理解题,根据文中语句“People often fly kites on a sunny and windy day.”理解可知。小题3:细节理解题,根据文中语句“When the kite doesn"t fly in the sky, just adjust(调整) the string reel.”理解可知。小题4:词义理解推测题,根据文中语句理解可知。小题5:细节理解题,根据文中语句“Flying kites is a very good activity in spring, and a lot of people like it.”理解可知。
2023-07-27 00:41:121

spring的翻译及音标。

1.Spring is the first season of a year.春天是一年中的第一个季节。2.Spring is a delightful season.春天是个让人欣喜的季节。3.The temperatures are moderate, and the blooming trees and flowers make the city bright with colors.春天气温适中,挂满绿叶的树和盛开的花朵给城市增添了明亮的色彩。4.Field,flower garden,the forest have a girl left behind traces of the spring.田野上,花圃上,森林里都有着春姑娘留下足迹。5.The breeze blowing,a fresh,delicate fragrance,elegant earthy oncoming.微风吹来,一阵清新、幽香、淡雅的泥土气息迎面而来。
2023-07-27 00:41:301

spring-boot跟整合mapper出现如下错误,盼望高手解答

mybatis没有配置对,没有正常注入mapper的bean
2023-07-27 00:41:511

spring是几月几日英语怎么写?

你好!spring是几月几日What is the date of spring?
2023-07-27 00:41:582

spring boot 问题???启动报错了???谢谢??

nested exception is java.io.FileNotFoundException: class path resource [null/] cannot be resolved to URL because it does not exist路径问题啊,黑马学员这都看不懂吗?
2023-07-27 00:42:181

spring4整合hibernate4,启动报错,Could not autowire field: private org.hibernate.SessionFactory

bean里没有配置链接数据库信息,如果配置了连接池的话 可以加<property name="dataSource" ref="dataSource" ></property>没有配连接池的话 可以在props标签里加子标签<prop key="hibernate.connection.driver_class" >com.mysql.jdbc.Driver</prop><prop key="hibernate.connection.url" >xxxxxxx</prop><prop key="hibernate.connection.username" >xxx</prop><prop key="hibernate.connection.password" >xxx</prop>
2023-07-27 00:42:261

Spring 报错,请各位大神帮忙看一下

蓝屏代码:0x000000f4蓝屏错误代码原因是因为找不到指定的模块。 解决方法如下: 1.查看这个蓝屏代码给出的讯息不足以判断具体出错的原因,还需用户自己观察。 2.一般的异常,开机按F8键,进入选择菜单,进入安全模式卸载问题驱动、删除、替换有
2023-07-27 00:42:341

2018-05-27 Spring拦截器和Skywalking冲突

skywalking-5.0.0-alpha 已经修复的版本 skywalking-5.0.0-beta 在观察项目中的日志时,发现 有一个拦截全部Controller方法的日志切面WebRequestInterceptor类 该方法会拦截skywalking的某个方法。 导致每次Web请求,Controller虽然被执行一次,但是doAround会被执行两次。 如果在doAround中做了某些身份认证,Token校验之类的,则产生了不必要的重复请求。 在doAround中打印: 会发现调用了getSkyWalkingDynamicField。 这个方法由skywalking-agent的InstMethodsInter 生成的: SkyWalkingAgent通过 找到一个具体实现类 然后调用define 然后生成了InstMethodsInter 这个类intercept的方法中: interceptor.afterMethod对应 GetBeanInterceptor 的 afterMethod, 这里会调用getSkyWalkingDynamicField ,但是 这里会被WebRequestInterceptor拦截!!! 。 getSkyWalkingDynamicField出自EnhancedInstance 在InstMethodsInter.afterMethod调用getSkyWalkingDynamicField的时候,不小心会被Spring的Aspect拦截。 导致重复调用了一次WebRequestInterceptor的doAround。 改写JoinPoint,并排除getSkyWalkingDynamicField方法 : 果然一个月之前官方已经修复了这个BUG 修复的原理就是把Spring的org.springframework.aop.support.MethodMatchers 的matches 静态方法给增强了,那就是让Spring忽略EnhancedInstance接口的所有方法! 这方法既粗暴,又优雅,非常值得学习。 相关链接 issue #1114 pull #1118
2023-07-27 00:42:411