文档章节

spring boot项目搭建中遇到的问题

o
 osc_ogi0qclx
发布于 2019/08/25 10:03
字数 2229
阅读 25
收藏 0

行业解决方案、产品招募中!想赚钱就来传!>>>

  自己动手搭建一下spring boot的项目,中途遇到了几个问题,在这里记录一下!

一、关于数据库中的表设计的问题

1、设计表的时候一定要添加的两个字段created updated 创建时间与更新时间 这两个字段是必须的
2、数据库的表字段设计一定要规范,因为如果使用分页助手的话,你的表字段设计不规范,会存在很多问题
比如:我的book_info 表中的字段 有一个是pubInfo 驼峰命名法,但是其他的是book_name、img_url 下划线命名法,造成使用通用mapper以及分页助手的时候,会造成找不到pub_info
这一列,我猜可能他的插件的内部是使用的下划线命名法的字段吧,这种东西一定要在设计之前考虑到,规范的是使用下划线那种命名的方法
...这个是可以自己设置的。在实体类中用注解的方式来设置table的名称以及column的名称,害得我重新设计了一张表,不过,最好约束自己遵守规范

3、设计数据库表的字段的时候一定要设置字符集,最好就是通用的utf-8,避免以后数据插入数据库的时候出现乱码的问题

二、项目搭建中问题

集成一下通用mapper以及分页助手以及数据池,优化一下数据库连接访问,通用mapper以及分页助手可以简化很多代码,提高开发效率

1、分页助手的版本问题

正确的maven中的依赖各个版本号:

 1     <!--通用mapper -->
 2     <dependency>
 3         <groupId>tk.mybatis</groupId>
 4         <artifactId>mapper-spring-boot-starter</artifactId>
 5         <version>1.1.0</version>
 6     </dependency>
 7     <!--pagehelper分页助手 -->
 8     <dependency>
 9         <groupId>com.github.pagehelper</groupId>
10         <artifactId>pagehelper-spring-boot-starter</artifactId>
11         <version>1.2.10</version>
12     </dependency>
13     <!--阿里巴巴数据源 -->
14     <dependency>
15         <groupId>com.alibaba</groupId>
16         <artifactId>druid</artifactId>
17         <version>1.0.25</version>
18     </dependency>

这里面需要注意的是分页助手,这个之前用的是1.1.0,但是和最新的2.1.7的springboot整合的时候回报错,重现了一下错误信息:

 1 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration': Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
 2     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:570)
 3     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
 4     at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
 5     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
 6     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
 7     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
 8     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845)
 9     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
10     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
11     at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
12     at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743)
13     at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390)
14     at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
15     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214)
16     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203)
17     at com.example.demo.web.DemoWebApplication.main(DemoWebApplication.java:18)
18 Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
19     at org.springframework.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:760)
20     at org.springframework.util.ReflectionUtils.doWithLocalFields(ReflectionUtils.java:692)
21     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.buildResourceMetadata(CommonAnnotationBeanPostProcessor.java:365)
22     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.findResourceMetadata(CommonAnnotationBeanPostProcessor.java:350)
23     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:298)
24     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1077)
25     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:567)
26     ... 15 common frames omitted
27 Caused by: java.lang.NoClassDefFoundError: Lorg/springframework/boot/bind/RelaxedPropertyResolver;
28     at java.lang.Class.getDeclaredFields0(Native Method)
29     at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
30     at java.lang.Class.getDeclaredFields(Class.java:1916)
31     at org.springframework.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:755)
32     ... 21 common frames omitted
33 Caused by: java.lang.ClassNotFoundException: org.springframework.boot.bind.RelaxedPropertyResolver
34     at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
35     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
36     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
37     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
38     ... 25 common frames omitted

看这个错误信息好像是和AppClassLoader有关的,类加载器加载不到所需要的RelaxedPropertyResolver类,具体内部是怎么解决这个问题的,也不知道,通过网上求救是换jar的版本换成1.2.10的版本就OK了

2、application.properties文件中的配置中的问题

这里的问题主要是通用mapper的问题:先看一下正确的配置

1 # 通用mapper配置
2 mapper.mappers=com.example.demo.dao.BaseMapper
3 mapper.not-empty=false
4 mapper.identity=MYSQL

这里面有一个配置需要注意:mapper.mappers 这个配置,这个配置是需要配置你写的那个基础的mapper类的全路径的BaseMapper的代码:

1 /**
2  * @program: demo
3  * @description: 基础的mapper
4  * @author: ssc
5  * @create: 2019/8/20 10:21
6  **/
7 public interface BaseMapper<T> extends Mapper<T>,MySqlMapper<T>{
8 
9 }

这个如果没有配置正确的话,启动的时候也会报错的,具体的报错信息:

1 Description:
2 Failed to bind properties under 'mapper.mappers' to java.util.List<java.lang.Class<?>>:
3     Reason: No converter found capable of converting from type [java.lang.String] to type [java.util.List<java.lang.Class<?>>]

补充一下:这里还有一个问题,就是BaseMapper能和业务中的mapper类放到一个包中的问题,这个还没有验证,反正现在是不放到一个包中是没有问题的

TODO:这个明天验证一下
2019年8月21日09:46:30 今天来验证一下这个,这个好像是不行的,因为在启动类中加入了@MapperScan("com.example.demo.dao.mapper")注解,不能让启动类扫描到这个BaseMapper不能放到和@MapperScan注解的同一个包下面,不然会报错,创建失败

 1 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.github.pagehelper.autoconfigure.MapperAutoConfiguration': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class
 2     at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:139)
 3     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:414)
 4     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770)
 5     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
 6     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
 7     at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
 8     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
 9     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
10     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
11     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845)
12     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
13     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
14     at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
15     at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743)
16     at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390)
17     at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
18     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214)
19     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203)
20     at com.example.demo.web.DemoWebApplication.main(DemoWebApplication.java:18)
21 Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class
22     at tk.mybatis.mapper.mapperhelper.MapperHelper.setSqlSource(MapperHelper.java:247)
23     at tk.mybatis.mapper.mapperhelper.MapperHelper.processConfiguration(MapperHelper.java:310)
24     at tk.mybatis.mapper.mapperhelper.MapperHelper.processConfiguration(MapperHelper.java:289)
25     at com.github.pagehelper.autoconfigure.MapperAutoConfiguration.addPageInterceptor(MapperAutoConfiguration.java:69)
26     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
27     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
28     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
29     at java.lang.reflect.Method.invoke(Method.java:498)
30     at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:363)
31     at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:307)
32     at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136)
33     ... 18 common frames omitted
34 Caused by: java.lang.RuntimeException: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class
35     at tk.mybatis.mapper.mapperhelper.MapperTemplate.setSqlSource(MapperTemplate.java:246)
36     at tk.mybatis.mapper.mapperhelper.MapperHelper.setSqlSource(MapperHelper.java:244)
37     ... 28 common frames omitted
38 Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class
39     at tk.mybatis.mapper.mapperhelper.MapperTemplate.getEntityClass(MapperTemplate.java:278)
40     at tk.mybatis.mapper.provider.base.BaseSelectProvider.selectCount(BaseSelectProvider.java:111)
41     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
42     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
43     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
44     at java.lang.reflect.Method.invoke(Method.java:498)
45     at tk.mybatis.mapper.mapperhelper.MapperTemplate.setSqlSource(MapperTemplate.java:234)
46     ... 29 common frames omitted

3、实体类与数据库表对应的问题

这个就是一些字段与实体类的属性,以及表名称与类名称的对应的问题了,这个也是很恶心的,还是不是很熟悉,所以总是报错,在创建实体类的时候,最好在类名上加上@Table(name="表名称")以及在属性上加上@Column(name="字段名称")这样的注解,以防范出现对应错误

4、BaseService封装的问题

先看一下错误信息:

 1 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bookController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bookService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'tk.mybatis.mapper.common.Mapper<?>' available: expected single matching bean but found 2: bookInfoMapper,bookMapper
 2     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:324)
 3     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411)
 4     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
 5     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
 6     at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
 7     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
 8     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
 9     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
10     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845)
11     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
12     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
13     at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
14     at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743)
15     at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390)
16     at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
17     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214)
18     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203)
19     at com.example.demo.web.DemoWebApplication.main(DemoWebApplication.java:18)
20 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bookService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'tk.mybatis.mapper.common.Mapper<?>' available: expected single matching bean but found 2: bookInfoMapper,bookMapper
21     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:324)
22     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411)
23     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
24     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
25     at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
26     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
27     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
28     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
29     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:452)
30     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:526)
31     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:496)
32     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:636)
33     at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:180)
34     at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
35     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:321)
36     ... 17 common frames omitted
37 Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'tk.mybatis.mapper.common.Mapper<?>' available: expected single matching bean but found 2: bookInfoMapper,bookMapper
38     at org.springframework.beans.factory.config.DependencyDescriptor.resolveNotUnique(DependencyDescriptor.java:221)
39     at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1229)
40     at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171)
41     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:520)
42     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:496)
43     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:636)
44     at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:180)
45     at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
46     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:321)
47     ... 31 common frames omitted

这个错误的根本原因是在封装的通用的service中,因为也就是BaseService这个类,开始写的是使用的
@Autowired
private Mapper<T> mapper;

为啥这样写就会出现那个错误呢 ?分析一下可以知道,当一个新创建的service层的类继承BaseService的时候,BaseService需要自动注入Mapper类,但是这时候Mapper发现spring容器中有多个类实现了Mapper,到底是用哪一个实现类呢,他自己搞不清楚,于是就抛出异常了,找到了多个实现类,现在记不清之前如何解决这个问题的,但是可以退一步,不要在BaseService中自动注入Mapper类我就明确告诉你,你需要实现那个Mapper类型的class。

具体的解决方法是:

我创建一个抽象的方法,子类继承我的时候需要给我一个具体的实现类
public abstract Mapper<T> getMapper();

例如:子类BookService 直接把你实现的BookMapper给了父类就行了,这样就不会有那个,不知道实现哪个子类的情况了:

 1 @Service
 2 public class BookService extends BaseService<BookInfo>{
 3 
 4     private Logger logger = LoggerFactory.getLogger(BookService.class);
 5 
 6     @Autowired
 7     private BookMapper bookMapper;
 8 
 9     @Override
10     public Mapper<BookInfo> getMapper() {
11         return bookMapper;
12     }
13 }

 

o
粉丝 0
博文 500
码字总数 0
作品 0
私信 提问
加载中
请先登录后再评论。
SQLServer实现split分割字符串到列

网上已有人实现sqlserver的split函数可将字符串分割成行,但是我们习惯了split返回数组或者列表,因此这里对其做一些改动,最终实现也许不尽如意,但是也能解决一些问题。 先贴上某大牛写的s...

cwalet
2014/05/21
9.6K
0
Swift百万线程攻破单例(Singleton)模式

一、不安全的单例实现 在上一篇文章我们给出了单例的设计模式,直接给出了线程安全的实现方法。单例的实现有多种方法,如下面: class SwiftSingleton { } 这段代码的实现,在shared中进行条...

一叶博客
2014/06/20
3.3K
16
beego API开发以及自动化文档

beego API开发以及自动化文档 beego1.3版本已经在上个星期发布了,但是还是有很多人不了解如何来进行开发,也是在一步一步的测试中开发,期间QQ群里面很多人都问我如何开发,我的业余时间实在...

astaxie
2014/06/25
2.7W
22
树莓派(Raspberry Pi):完美的家用服务器

自从树莓派发布后,所有在互联网上的网站为此激动人心的设备提供了很多有趣和具有挑战性的使用方法。虽然这些想法都很棒,但树莓派( RPi )最明显却又是最不吸引人的用处是:创建你的完美家用...

异次元
2013/11/09
5.4K
8
5分钟 maven3 快速入门指南

前提条件 你首先需要了解如何在电脑上安装软件。如果你不知道如何做到这一点,请询问你办公室,学校里的人,或花钱找人来解释这个给你。 不建议给Maven的服务邮箱来发邮件寻求支持。 安装Mav...

fanl1982
2014/01/23
1.2W
6

没有更多内容

加载失败,请刷新页面

加载更多

如何在SQL Server中将多行文本合并为单个文本字符串?

问题: Consider a database table holding names, with three rows: 考虑一个包含名称的数据库表,该表具有三行: PeterPaulMary Is there an easy way to turn this into a single str......

富含淀粉
17分钟前
9
0
在JavaScript中生成特定范围内的随机整数? - Generating random whole numbers in JavaScript in a specific range?

问题: 如何可以生成两个指定的变量之间的随机整数在JavaScript中,例如x = 4和y = 8将输出任何的4, 5, 6, 7, 8 ? 解决方案: 参考一: https://stackoom.com/question/6PRz/在JavaScript中...

fyin1314
47分钟前
8
0
Vim清除最后一个搜索突出显示 - Vim clear last search highlighting

问题: Want to improve this post? 想要改善这篇文章吗? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. 提供此问题......

技术盛宴
今天
23
0
马化腾每天刷 Leetcode?代码你打算写到几岁?

本文作者:o****0 前几天,一张未证真伪的截图流传,图中显示马化腾几乎每天都会在 Leetcode 上提交代码。 截图还贴出一个 Leetcode 账户地址。该地址的头像已从马化腾的照片换成腾讯 logo,...

百度开发者中心
前天
13
0
滴滴 3000+ Kylin Cube 背后的实践经验揭秘

本次分享主要有三个部分:Kylin 在滴滴的整体应用、架构的实践经验、滴滴全局字典最新版本的实现以及 Kylin 最新实时 OLAP 探索经验分享。 Kylin 在滴滴的应用&架构 Kylin 在滴滴的三类应用场...

浪尖聊大数据
昨天
9
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部