007.day05

本文详细介绍了Java中类的定义与实例化过程,包括构造器的作用及使用方法、非静态方法的调用方式、toString方法的功能及其重写注意事项,以及封装的概念与实践应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.类的定义与实例化

  1)构造器/构造方法/构造函数

    构造器在new的时候被调用

    构造器无返回值

2.属性和方法

  1)非静态方法必须先实例化(new)之后才能调用

3.toString

  在object类中有toString方法

  重写toString方法时注意返回值为String类型

  输出一个引用类型对象时会自动调用toString方法

4.封装

  1)private权限范围:只能在当前类中使用

       作用:私有化,不能再其他类中直接使用

  2)封装作用:要操作属性时只能通过方法调用,安全

  3)约定俗成get/set方式

  4)有时候可以在get/set方法中适当添加需要实现的逻辑

转载于:https://www.cnblogs.com/yokii/p/9330775.html

Listening for transport dt_socket at address: 33021 16:36:57.690 [main] INFO com.ulisesbocchio.jasyptspringboot.environment.EnvironmentInitializer -- Initializing Environment: StandardEncryptableEnvironment 16:36:57.829 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter -- Converting PropertySource systemProperties [org.springframework.core.env.PropertiesPropertySource] to EncryptableMapPropertySourceWrapper 16:36:57.832 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter -- Converting PropertySource systemEnvironment [org.springframework.core.env.SystemEnvironmentPropertySource] to EncryptableSystemEnvironmentPropertySourceWrapper 2025-05-27T16:37:18.998+08:00 INFO 11 --- [auth-center] [ main] [ ] c.hd.cloud.auth.AuthServerApplication : The following 1 profile is active: "redis_default" 2025-05-27T16:37:42.899+08:00 WARN 11 --- [auth-center] [ main] [ ] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.ws.config.annotation.DelegatingWsConfiguration' of type [org.springframework.ws.config.annotation.DelegatingWsConfiguration$$SpringCGLIB$$0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). The currently created BeanPostProcessor [annotationActionEndpointMapping] is declared through a non-static factory method on that class; consider declaring it as static instead. 2025-05-27T16:37:45.994+08:00 WARN 11 --- [auth-center] [ main] [ ] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration$DeferringLoadBalancerInterceptorConfig' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration$DeferringLoadBalancerInterceptorConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). The currently created BeanPostProcessor [lbRestClientPostProcessor] is declared through a non-static factory method on that class; consider declaring it as static instead. 2025-05-27T16:37:46.007+08:00 WARN 11 --- [auth-center] [ main] [ ] trationDelegate$BeanPostProcessorChecker : Bean 'deferringLoadBalancerInterceptor' of type [org.springframework.cloud.client.loadbalancer.DeferringLoadBalancerInterceptor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected/applied to a currently created BeanPostProcessor [lbRestClientPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies/advisors. If this bean does not have to be post-processed, declare it with ROLE_INFRASTRUCTURE. 2025-05-27T16:37:46.017+08:00 WARN 11 --- [auth-center] [ main] [ ] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). The currently created BeanPostProcessor [loadBalancerWebClientBuilderBeanPostProcessor] is declared through a non-static factory method on that class; consider declaring it as static instead. 2025-05-27T16:37:46.023+08:00 WARN 11 --- [auth-center] [ main] [ ] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactorDeferringLoadBalancerFilterConfig' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactorDeferringLoadBalancerFilterConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected/applied to a currently created BeanPostProcessor [loadBalancerWebClientBuilderBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies/advisors. If this bean does not have to be post-processed, declare it with ROLE_INFRASTRUCTURE. 2025-05-27T16:37:46.031+08:00 WARN 11 --- [auth-center] [ main] [ ] trationDelegate$BeanPostProcessorChecker : Bean 'reactorDeferringLoadBalancerExchangeFilterFunction' of type [org.springframework.cloud.client.loadbalancer.reactive.DeferringLoadBalancerExchangeFilterFunction] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected/applied to a currently created BeanPostProcessor [loadBalancerWebClientBuilderBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies/advisors. If this bean does not have to be post-processed, declare it with ROLE_INFRASTRUCTURE. 2025-05-27T16:37:49.032+08:00 ERROR 11 --- [auth-center] [ main] [ ] com.tongtech.commons.license.b.d : Remaining service days of the product: 10 2025-05-27T16:37:49.034+08:00 ERROR 11 --- [auth-center] [ main] [ ] c.t.commons.license.DefaultHandler : ********************************************************** The authorization certificate is about to expire Warning ********************************************************** Description: The validity period of your company`s authorization certificate is about to expire. The expiration date is 2025-06-06, and the remaining date is 10 day. Action: It is recommended to contact the sales or after-sales staff of TongTech as soon as possible to update the authorization certificate to ensure normal use of business applications 2025-05-27T16:38:08.617+08:00 WARN 11 --- [auth-center] [ main] [ ] org.hibernate.orm.deprecation : HHH90000025: Kingbase8Dialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default) 2025-05-27T16:38:26.457+08:00 WARN 11 --- [auth-center] [ main] [ ] org.hibernate.orm.deprecation : HHH90000025: Kingbase8Dialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default) 2025-05-27T16:38:51.895+08:00 WARN 11 --- [auth-center] [ main] [ ] r$InitializeUserDetailsManagerConfigurer : Global AuthenticationManager configured with an AuthenticationProvider bean. UserDetailsService beans will not be used for username/password login. Consider removing the AuthenticationProvider bean. Alternatively, consider using the UserDetailsService in a manually instantiated DaoAuthenticationProvider. 2025-05-27T16:39:09.169+08:00 INFO 11 --- [auth-center] [ main] [ ] h.c.a.c.WebServiceConfig$$SpringCGLIB$$0 : thirdPartyAppWebService webService ????????? 2025-05-27T16:39:28.105+08:00 INFO 11 --- [auth-center] [ main] [ ] c.hd.cloud.auth.AuthServerApplication : Started AuthServerApplication in 150.203 seconds (process running for 156.731) 耗时分析
05-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值