mirror of
				https://gitee.com/coder-xiaomo/java-note
				synced 2025-11-04 14:13:13 +08:00 
			
		
		
		
	5
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								张博凯的Java学习笔记.assets/image-20220120222121539.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								张博凯的Java学习笔记.assets/image-20220120222121539.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 5.9 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								张博凯的Java学习笔记.assets/image-20220120231646089.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								张博凯的Java学习笔记.assets/image-20220120231646089.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 4.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								张博凯的Java学习笔记.assets/image-20220120232421282.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								张博凯的Java学习笔记.assets/image-20220120232421282.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 16 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								张博凯的Java学习笔记.assets/image-20220120232442818.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								张博凯的Java学习笔记.assets/image-20220120232442818.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 21 KiB  | 
@@ -4159,6 +4159,36 @@ src/main/resources/spring-servlet.xml
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    <!-- 扫描注解的包 -->
 | 
					    <!-- 扫描注解的包 -->
 | 
				
			||||||
    <context:component-scan base-package="org.example.web"></context:component-scan>
 | 
					    <context:component-scan base-package="org.example.web"></context:component-scan>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!-- 声明MVC的注解 --><!-- MVC管理的注解 -->
 | 
				
			||||||
 | 
					    <mvc:annotation-driven></mvc:annotation-driven>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!-- 请求数据访问 --><!-- 默认的Servlet处理器 -->
 | 
				
			||||||
 | 
					    <mvc:default-servlet-handler></mvc:default-servlet-handler>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!--thymeleaf模板解析器-->
 | 
				
			||||||
 | 
					    <bean id="templateResolver" class="org.thymeleaf.spring4.templateresolver.SpringResourceTemplateResolver">
 | 
				
			||||||
 | 
					        <property name="prefix" value="/WEB-INF/templates/"></property>
 | 
				
			||||||
 | 
					        <property name="suffix" value=".html"></property>
 | 
				
			||||||
 | 
					        <property name="templateMode" value="HTML5"></property>
 | 
				
			||||||
 | 
					        <property name="cacheable" value="false"></property>
 | 
				
			||||||
 | 
					        <property name="characterEncoding" value="utf-8"></property>
 | 
				
			||||||
 | 
					    </bean>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine">
 | 
				
			||||||
 | 
					        <property name="templateResolver" ref="templateResolver"></property>
 | 
				
			||||||
 | 
					    </bean>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!--视图解析器-->
 | 
				
			||||||
 | 
					    <bean class="org.thymeleaf.spring4.view.ThymeleafViewResolver">
 | 
				
			||||||
 | 
					        <property name="templateEngine" ref="templateEngine"></property>
 | 
				
			||||||
 | 
					        <property name="characterEncoding" value="utf-8"></property>
 | 
				
			||||||
 | 
					    </bean>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!-- 配置静态资源放行 -->
 | 
				
			||||||
 | 
					    <mvc:resources mapping="/css/**" location="/css/"></mvc:resources>
 | 
				
			||||||
 | 
					    <mvc:resources mapping="/js/**" location="/js/"></mvc:resources>
 | 
				
			||||||
 | 
					    <mvc:resources mapping="/images/**" location="/images/"></mvc:resources>
 | 
				
			||||||
</beans>
 | 
					</beans>
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user