当前位置: 首页 > news >正文

商城网站建设哪个比较好wordpress 分类目录 路径

商城网站建设哪个比较好,wordpress 分类目录 路径,个人养老保险查询,科技公司 网站模板internationalization详解 国际化#xff08;internationalization#xff09;是设计和制造容易适应不同区域要求的产品的一种方式。它要求从产品中抽离所有地域语言#xff0c;国家/地区和文化相关的元素。换言之#xff0c;应用程序的功能和代码设计考虑在不同地区运行的…internationalization详解 国际化internationalization是设计和制造容易适应不同区域要求的产品的一种方式。它要求从产品中抽离所有地域语言国家/地区和文化相关的元素。换言之应用程序的功能和代码设计考虑在不同地区运行的需要其代码简化了不同本地版本的生产。开发这样的程序的过程就称为国际化。数据国际化 ** 从请求作用域获取locale然后查询对应的数据** 中文语言数据页面只有中文数据 英文语言数据页面只有英文数据 浏览器切换中文英文 模型对象User Entity Table(name t_user) public class User {IdGeneratedValueprivate Long id;private String name;private Integer age;private String locale;//通过此字段查询对应的数据初始化类InitApplicationListener package com.jege.spring.boot.controller;import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationListener; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.stereotype.Component;import com.jege.spring.boot.data.jpa.entity.User; import com.jege.spring.boot.data.jpa.repository.UserRepository;/*** spring的事件监听器的处理机制在启动服务器的时候插入默认数据*/ Component public class InitApplicationListener implements ApplicationListenerContextRefreshedEvent {Overridepublic void onApplicationEvent(ContextRefreshedEvent event) {ApplicationContext context event.getApplicationContext();UserRepository userRepository context.getBean(userRepository, UserRepository.class);User user;for (int i 1; i 21; i) {if (i % 2 0) {user new User(小明 i, 25 i);user.setLocale(zh);} else {user new User(zh-ge i, 25 i);user.setLocale(en);}userRepository.save(user);}}}控制器类UserController // 从user.jsp列表页面由easyui-datagrid发出ajax请求获取json数据RequestMapping(/json)ResponseBodypublic MapString, Object json(RequestParam(name page, defaultValue 1) int page,RequestParam(name rows, defaultValue 10) int rows, final String q, HttpServletRequest request) {// 按照id降序Sort sort new Sort(Sort.Direction.DESC, id);// 封装分页查询条件Pageable pageable new PageRequest(page - 1, rows, sort);// 拼接查询条件SpecificationUser specification new SpecificationUser() {Overridepublic Predicate toPredicate(RootUser root, CriteriaQuery? query, CriteriaBuilder cb) {ListPredicate list new ArrayListPredicate();if (!StringUtils.isEmpty(q)) {list.add(cb.like(root.get(name).as(String.class), % q %));}if (request.getLocale().toString().contains(en)) {list.add(cb.like(root.get(locale).as(String.class), %en%));} else {list.add(cb.like(root.get(locale).as(String.class), %zh%));}Predicate[] p new Predicate[list.size()];return cb.and(list.toArray(p));}};return findEasyUIData(userRepository.findAll(specification, pageable));}如果感觉不错记得点赞哟
http://www.yutouwan.com/news/148041/

相关文章:

  • 网站模版如何建设计公司网站要包含什么信息
  • 营销型网站建设怎么收费建商城网站带app多少钱
  • 网站建设运维情况名片seo什么意思
  • 做国际网站长沙哪家网站设计好
  • 怎么看公司网站建设的时间做网站该读啥
  • 福州营销型网站建设网络架构设计方案
  • wordpress百度推送代码加统计重庆网站优化指导
  • 吉安市规划建设局网站开源手机网站建站系统
  • 男生女生做污事网站免费盐城中瑞做网站公司
  • 锦州网站建设多少钱广告公司网站官网
  • 承德网站建设费用一般做音响的有哪些网站
  • 网上做二建题那个网站好wordpress可以做企业管理系统吗
  • 如何做网站meta设置app上架应用市场需要多少费用
  • 韩漫网站建设asp做微网站设计
  • 网站页面需求烟台网站建设 制作 推广
  • 域名注册之后如何建设网站建立网站目录结构时不正确的建议是
  • 淄博英文网站建设微信小程序有什么用处?
  • 做网站的模版建设l旅游网站目的及功能定位
  • 怎样做关键词网站网站设计的一般流程是什么
  • 东莞网站建设价格网站整站模板
  • 网站推广前景怎么样如何给wordpress导航添加图标
  • 网站建设高考题盘石 网站建设
  • 做网站为什么要做备案接入东莞机械网络推广
  • 做一款网站注意啥外贸网站建站赚钱
  • 门户网站建设模板下载南昌seo方案
  • 酷炫的网站欢迎页面公司网站管理图片
  • 全英文外贸网站建设丽江建设局网站
  • 广州市网站公司使用wordpress搭建博客
  • 绍兴公司网站建设 中企动力绍兴sem是什么职业岗位
  • 建站平台有哪些免费一键搭建网站oa软件多少钱一套