mybatis-plus-boot-starter包与mybatis-plus-generator的冲突解决

 更新时间:2023年10月25日 11:33:05   作者:L564458192  
本文主要介绍了mybatis-plus-boot-starter包与mybatis-plus-generator的冲突解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

我这里搭建框架时mybatis-plus-boot-starter 包的版本是3.5.0,一定要注意版本,因为现在很多spring高版本的jar包都要求高于jkd8,但是因为学习、开发及维护成本,市面上主流的还是jkd8。

继续说我这次搭建框架所遇到到的问题,先看具体的UBG内容:

2023-04-03 18:23:52.052 [INFO ] org.springframework.data.repository.config.RepositoryConfigurationDelegate 262 Multiple Spring Data modules found, entering strict repository configuration mode 
2023-04-03 18:23:52.052 [INFO ] org.springframework.data.repository.config.RepositoryConfigurationDelegate 132 Bootstrapping Spring Data Redis repositories in DEFAULT mode. 
2023-04-03 18:23:52.052 [INFO ] org.springframework.data.repository.config.RepositoryConfigurationDelegate 201 Finished Spring Data repository scanning in 9 ms. Found 0 Redis repository interfaces. 
2023-04-03 18:23:52.052 [WARN ] org.mybatis.spring.mapper.ClassPathMapperScanner 44 Skipping MapperFactoryBean with name 'baseAuthMapper' and 'com.javahome.dao.mapper.BaseAuthMapper' mapperInterface. Bean already defined with the same name! 
2023-04-03 18:23:52.052 [WARN ] org.mybatis.spring.mapper.ClassPathMapperScanner 44 Skipping MapperFactoryBean with name 'baseAuthResourceMapper' and 'com.javahome.dao.mapper.BaseAuthResourceMapper' mapperInterface. Bean already defined with the same name! 
2023-04-03 18:23:52.052 [WARN ] org.mybatis.spring.mapper.ClassPathMapperScanner 44 Skipping MapperFactoryBean with name 'baseDeptMapper' and 'com.javahome.dao.mapper.BaseDeptMapper' mapperInterface. Bean already defined with the same name! 
2023-04-03 18:23:52.052 [WARN ] org.mybatis.spring.mapper.ClassPathMapperScanner 44 Skipping MapperFactoryBean with name 'baseRoleAuthMapper' and 'com.javahome.dao.mapper.BaseRoleAuthMapper' mapperInterface. Bean already defined with the same name! 
2023-04-03 18:23:52.052 [WARN ] org.mybatis.spring.mapper.ClassPathMapperScanner 44 Skipping MapperFactoryBean with name 'baseRoleMapper' and 'com.javahome.dao.mapper.BaseRoleMapper' mapperInterface. Bean already defined with the same name! 
2023-04-03 18:23:52.052 [WARN ] org.mybatis.spring.mapper.ClassPathMapperScanner 44 Skipping MapperFactoryBean with name 'baseUserInfoMapper' and 'com.javahome.dao.mapper.BaseUserInfoMapper' mapperInterface. Bean already defined with the same name! 
2023-04-03 18:23:52.052 [WARN ] org.mybatis.spring.mapper.ClassPathMapperScanner 44 Skipping MapperFactoryBean with name 'baseUserRoleMapper' and 'com.javahome.dao.mapper.BaseUserRoleMapper' mapperInterface. Bean already defined with the same name! 
2023-04-03 18:23:52.052 [WARN ] org.mybatis.spring.mapper.ClassPathMapperScanner 44 Skipping MapperFactoryBean with name 'sysResourceMapper' and 'com.javahome.dao.mapper.SysResourceMapper' mapperInterface. Bean already defined with the same name! 
2023-04-03 18:23:52.052 [WARN ] org.mybatis.spring.mapper.ClassPathMapperScanner 44 No MyBatis mapper was found in '[com.javahome.dao.mapper]' package. Please check your configuration. 
2023-04-03 18:23:53.053 [WARN ] io.undertow.websockets.jsr 68 UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used 
2023-04-03 18:23:53.053 [INFO ] io.undertow.servlet 382 Initializing Spring embedded WebApplicationContext 
2023-04-03 18:23:53.053 [INFO ] org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext 292 Root WebApplicationContext: initialization completed in 2210 ms 
2023-04-03 18:23:54.054 [WARN ] org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext 591 Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'loginController': Unsatisfied dependency expressed through method 'setRoleService' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'baseRoleServiceImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseRoleMapper' defined in file [D:\ctvit_code\springboot-javahome\javahome-dao\target\classes\com\javahome\dao\mapper\BaseRoleMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: com/baomidou/mybatisplus/core/handlers/PostInitTableInfoHandler 
2023-04-03 18:23:54.054 [INFO ] org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener 136 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 
2023-04-03 18:23:54.054 [ERROR] org.springframework.boot.SpringApplication 824 Application run failed 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'loginController': Unsatisfied dependency expressed through method 'setRoleService' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'baseRoleServiceImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseRoleMapper' defined in file [D:\ctvit_code\springboot-javahome\javahome-dao\target\classes\com\javahome\dao\mapper\BaseRoleMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: com/baomidou/mybatisplus/core/handlers/PostInitTableInfoHandler
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:767)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:719)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
	at com.javahome.web.JavahomeWebApplication.main(JavahomeWebApplication.java:31)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'baseRoleServiceImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseRoleMapper' defined in file [D:\ctvit_code\springboot-javahome\javahome-dao\target\classes\com\javahome\dao\mapper\BaseRoleMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: com/baomidou/mybatisplus/core/handlers/PostInitTableInfoHandler
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:759)
	... 20 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'baseRoleMapper' defined in file [D:\ctvit_code\springboot-javahome\javahome-dao\target\classes\com\javahome\dao\mapper\BaseRoleMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: com/baomidou/mybatisplus/core/handlers/PostInitTableInfoHandler
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1534)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1417)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:479)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:550)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
	at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
	... 31 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: com/baomidou/mybatisplus/core/handlers/PostInitTableInfoHandler
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1519)
	... 45 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: com/baomidou/mybatisplus/core/handlers/PostInitTableInfoHandler
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
	... 58 common frames omitted
Caused by: java.lang.NoClassDefFoundError: com/baomidou/mybatisplus/core/handlers/PostInitTableInfoHandler
	at com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration.sqlSessionFactory(MybatisPlusAutoConfiguration.java:215)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 59 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.baomidou.mybatisplus.core.handlers.PostInitTableInfoHandler
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 65 common frames omitted
Disconnected from the target VM, address: '127.0.0.1:56832', transport: 'socket'

Process finished with exit code 1

我的pom.xml引用:

    <!-- 引入Druid依赖,阿里巴巴所提供的数据源 -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.0.28</version>
        </dependency>
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>3.5.3</version>
        </dependency>
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-generator</artifactId>
            <version>3.5.3</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.29</version>
        </dependency>

具体是什么原因导致的不清楚,直接说解决办法:问题就在mybatis-plus-generator 这个包及版本上,将mybatis-plus-generator删除,并降低版本至3.5.0,项目正常启动访问。

到此这篇关于mybatis-plus-boot-starter包与mybatis-plus-generator的冲突的文章就介绍到这了,更多相关mybatis-plus-boot-starter与mybatis-plus-generator内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!

相关文章

  • mybatis的dtd约束文件及配置文件xml自动提示操作

    mybatis的dtd约束文件及配置文件xml自动提示操作

    这篇文章主要介绍了mybatis的dtd约束文件及配置文件xml自动提示操作,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
    2020-12-12
  • 一文详解Springboot集成mybatis-plus

    一文详解Springboot集成mybatis-plus

    这篇文章主要介绍了Mybatis-Plus与SpringBoot整合,并在项目中实战运用,列举其增删改查的使用方式,对学习或工作有一定的帮助,需要的小伙伴可以参考阅读
    2023-04-04
  • Java多线程(单例模式,阻塞队列,定时器,线程池)详解

    Java多线程(单例模式,阻塞队列,定时器,线程池)详解

    本文是多线程初级入门,主要介绍了多线程单例模式、阻塞队列、定时器、线程池、多线程面试考点,感兴趣的小伙伴可以跟随小编一起了解一下
    2022-09-09
  • Spring事务管理的使用细则浅析

    Spring事务管理的使用细则浅析

    事务的作用就是为了保证用户的每一个操作都是可靠的,事务中的每一步操作都必须成功执行,只要有发生异常就 回退到事务开始未进行操作的状态。事务管理是Spring框架中最为常用的功能之一,我们在使用Spring开发应用时,大部分情况下也都需要使用事务
    2023-02-02
  • SpringBoot测试配置属性与web启动环境超详细图解

    SpringBoot测试配置属性与web启动环境超详细图解

    Web开发的核心内容主要包括内嵌的Servlet容器和SpringMVCSpringBoot使用起来非常简洁,大部分配置都有SpringBoot自动装配,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习吧
    2022-10-10
  • 记一次springboot服务凌晨无故宕机问题的解决

    记一次springboot服务凌晨无故宕机问题的解决

    这篇文章主要介绍了记一次springboot服务凌晨无故宕机问题的解决,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
    2020-09-09
  • springboot+vue实现阿里云oss大文件分片上传的示例代码

    springboot+vue实现阿里云oss大文件分片上传的示例代码

    阿里云推出了直传,本文主要介绍了springboot+vue实现阿里云oss大文件分片上传的示例代码,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
    2024-06-06
  • Java中OGNL表达式语言的使用详解

    Java中OGNL表达式语言的使用详解

    本文介绍了OGNL(ObjectGraphNavigationLanguage)表达式语言,这是一种用于Java语言的对象图导航和操作的表达式语言,它支持访问对象属性、调用对象方法、执行算术和逻辑运算,以及处理集合和数组等操作,OGNL的语法简洁明了
    2024-12-12
  • Java通过try释放资源的方法

    Java通过try释放资源的方法

    这篇文章主要介绍了Java通过try释放资源的方法,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下
    2020-04-04
  • 浅析Java中的继承与组合

    浅析Java中的继承与组合

    本文将介绍组合和继承的概念及区别,并从多方面分析在写代码时如何进行选择。文中通过示例代码介绍的很详细,有需要的朋友可以参考借鉴,下面来一起看看吧。
    2016-12-12

最新评论