![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javaweb
tonghenyantou
这个作者很懒,什么都没留下…
展开
-
IDEA创建MavenWeb项目并发布到本地Tomcat目录下webapps全过程
一、环境准备 1、JDK1.8版本,配置好环境变量; 2、Tomcat本地已安装,版本 7.0.90; 3、Idea 2017.3.5 (需要激活); 4、Maven 3.5.3 (需要配置本地仓库:https://www.cnblogs.com/growthTree/p/6284831.html、 Maven关联上idea:https://j...原创 2018-09-11 18:00:47 · 10558 阅读 · 2 评论 -
spring ioc和DI
转孤傲苍狼的文章:https://www.com/xdp-gacl/p/4249939.html以及:https://blog.csdn.net/u010450931/article/details/82787255转载 2018-10-03 10:55:55 · 77 阅读 · 0 评论 -
spring注解@Component、@controller、@service、@repository
声明bean的注解:@Component、@controller、@service、@repository一、@Component注解作用:把普通pojo实例化到spring容器中,相当于之前xml配置文件中的 <bean id="" class=""/> ) Component注解也就是“Controller注解”、“Service注解”和“Repository...转载 2018-10-04 14:32:35 · 5815 阅读 · 0 评论 -
spring注解@Autowired、@Resource、@Inject
注入bean的注解:@Autowired、@Resource、@Inject一、@Autowired注解 (1)以下例子,若不写 @Qualifier注解,代表按照类型(GoodsService的类型)去spring容器中找对应的bean,并注入,找不到则抛出异常,如果允许null值,则这样@Autowired(required=false) 书写; (2)...转载 2018-10-04 15:34:29 · 1090 阅读 · 0 评论 -
spring注解@ComponentScan、@Configuration、@Bean、@Scope
java配置类相关注解:@ComponentScan、@Configuration、@Bean一、@ComponentScan注解 @ComponentScan("net.quickcodes.*")类似于配置文件中的一行: @ComponentScan注解是什么?@ComponentScan主要就是定义扫描的路径,并从中找出标识了需要装配的类自动装配到sprin...转载 2018-10-05 10:16:20 · 3754 阅读 · 0 评论 -
spring注解@Import、@ImportResource、@PropertySource、@Value、@ConfigurationProperties
一、@Import注解 JavaConfigA配置类: JavaConfigB配置类: ParentConfig配置类,引入了JavaConfigA、和JavaConfigB两个配置类: 测试类:只注册加载ParentConfig配置类 就可以了。 @Import注解是引...转载 2018-10-05 15:45:22 · 5274 阅读 · 1 评论