当前位置: 首页 > news >正文

36kr源码WordPress北京seo供应商

36kr源码WordPress,北京seo供应商,类似酷家乐做庭院的网站,个人一般注册什么类型的公司基本概念 春天 Spring 是用于开发 Java 应用程序的开源框架,为解决企业应用开发的复杂性而创建。 Spring 的基本设计思想是利用 IOC(依赖注入)和 AOP (面向切面)解耦应用组件,降低应用程序各组件之间的耦…

基本概念

春天

Spring 是用于开发 Java 应用程序的开源框架,为解决企业应用开发的复杂性而创建。

  1. Spring 的基本设计思想是利用 IOC(依赖注入)和 AOP (面向切面)解耦应用组件,降低应用程序各组件之间的耦合度。
  2. 在这两者的基础上,Spring 逐渐衍生出了其他的高级功能:如 Security,JPA 等。

Spring MVC

Spring MVC 是 Spring 的子功能模块,专用于 Web 开发。

Spring MVC 基于 Servlet 实现,将 Web 应用中的数据业务、显示逻辑和控制逻辑进行分层设计。开发者可以直接调用 Spring MVC 框架中 Spring 解耦的组件,快速构建 Web 应用。

Spring 引导

Spring Boot 是用于简化创建 Spring 项目配置流程,快速构建 Spring 应用程序的辅助工具。Spring Boot 本身并不提供 Spring 框架的核心特性以及扩展功能。但 在创建 Spring 项目时,Spring Boot 可以:

  1. 自动添加 Maven 依赖,不需要在 pom.xml 中手动添加配置依赖。
  2. 不需要配置 XML 文件,将全部配置浓缩在一个 appliaction.yml 配置文件中。
  3. 自动创建启动类,代表着本工程项目和服务器的启动加载。
  4. 内嵌 Tomcat 、Jetty 等容器,无需手动部署 war 文件。

Spring Boot 配置

依赖

在Spring Boot中,引入的所有包都是 starter 形式:

spring-boot-starter-web-services,针对 SOAP Web Services spring-boot-starter-web,针对 Web 应用与网络接口 spring-boot-starter-jdbc,针对 JDBC spring-boot-starter-data-jpa,基于 Hibernate 的持久层框架 spring-boot-starter-cache,针对缓存支持

默认映射路径

  • classpath:/META-INF/resources/
  • classpath:/resources/
  • classpath:/static/
  • classpath:/public/

优先级顺序:META-INF/resources > 资源 > static > public

全局配置

位于 resources 文件夹下,支持以下两种格式。由 Spring Boot 自动加载。

  1. application.properties
  2. application.yml
#端口号
server.port=8080
#访问前缀
server.servlet.context-path=/demo
#端口号
server.port=8080
#访问前缀
server.servlet.context-path=/demo#数据库驱动
jdbc.driver=com.mysql.jc.jdbc.Driver
#数据库链接
jdbc.url=jdbc:mysql://localhost:3306/demo?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC
#数据库用户名
jdbc.username=root
#数据库密码
jdbc.password=wdh19970506#Mybatis
#配置文件路径
mybatis_config_file=mybatis-config.xml
#SQL语句配置路径
mapper_path=/mapper/**.xml
#实体类所在包
type_alias_package=com.example.demo.entity
 
  • JDBC 连接 Mysql5 驱动: com.mysql.jdbc.Driver
  • JDBC 连接 Mysql6 驱动: com.mysql.cj.jdbc.Driver , URL 必须要指定时区 serverTimezone !

多重配置

在 Spring Boot 中,我们往往需要配置多个不同的配置文件去适应不同的环境:

  • application-dev.properties开发环境
  • application-test.properties测试环境
  • application-prod.properties生产环境

只需要在程序默认配置文件 中设置环境,就可以使用指定的配置。application.properties

spring.profiles.active=dev

启动类

@SpringBootApplication类:作为程序入口,在创建 Spring Boot 项目时自动创建。

等同于 + + ,会自动完成配置并扫描路径下所有包。@Configuration@EnableAutoConfiguration@ComponentScan

@SpringBootApplication
public class DemoApplication {public static void main(String[] args) {SpringApplication.run(DemoApplication.class, args);}}
 

Spring 需要定义调度程序 servlet ,映射和其他支持配置。我们可以使用 web.xml 文件或 Initializer 类来完成此操作:

public class MyWebAppInitializer implements WebApplicationInitializer {@Overridepublic void onStartup(ServletContext container) {AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();context.setConfigLocation("com.pingfangushi");container.addListener(new ContextLoaderListener(context));ServletRegistration.Dynamic dispatcher = container.addServlet("dispatcher", new DispatcherServlet(context));dispatcher.setLoadOnStartup(1);dispatcher.addMapping("/");}
}

还需要将 注释添加到 类,并定义一个视图解析器来解析从控制器返回的视图:@EnableWebMvc@Configuration

@EnableWebMvc
@Configuration
public class ClientWebConfig implements WebMvcConfigurer { @Beanpublic ViewResolver viewResolver() {InternalResourceViewResolver bean= new InternalResourceViewResolver();bean.setViewClass(JstlView.class);bean.setPrefix("/WEB-INF/view/");bean.setSuffix(".jsp");return bean;}
}


文章转载自:
http://dinncounread.ssfq.cn
http://dinncodona.ssfq.cn
http://dinncokeynote.ssfq.cn
http://dinncotoccata.ssfq.cn
http://dinncogeophysical.ssfq.cn
http://dinncofart.ssfq.cn
http://dinncoindefective.ssfq.cn
http://dinncountinged.ssfq.cn
http://dinncomonostylous.ssfq.cn
http://dinncoepigraphist.ssfq.cn
http://dinncodecide.ssfq.cn
http://dinncosmoulder.ssfq.cn
http://dinncodated.ssfq.cn
http://dinncotheocracy.ssfq.cn
http://dinncoblindness.ssfq.cn
http://dinncoalleviatory.ssfq.cn
http://dinncosawback.ssfq.cn
http://dinncoprowl.ssfq.cn
http://dinncolieve.ssfq.cn
http://dinncocomputerize.ssfq.cn
http://dinncopoised.ssfq.cn
http://dinncocuneatic.ssfq.cn
http://dinncocloke.ssfq.cn
http://dinncosynonymic.ssfq.cn
http://dinncovioloncellist.ssfq.cn
http://dinncoomerta.ssfq.cn
http://dinncosubstandard.ssfq.cn
http://dinncoentomolite.ssfq.cn
http://dinncofi.ssfq.cn
http://dinncoalgonquian.ssfq.cn
http://dinncolength.ssfq.cn
http://dinnconewswire.ssfq.cn
http://dinncooverbid.ssfq.cn
http://dinncoyonker.ssfq.cn
http://dinncohomoerotic.ssfq.cn
http://dinncooutseg.ssfq.cn
http://dinncorheologic.ssfq.cn
http://dinncohomocercality.ssfq.cn
http://dinncoeelpot.ssfq.cn
http://dinncoectosarc.ssfq.cn
http://dinncotautog.ssfq.cn
http://dinncosemper.ssfq.cn
http://dinncovacationland.ssfq.cn
http://dinncokshatriya.ssfq.cn
http://dinncotypey.ssfq.cn
http://dinncotaradiddle.ssfq.cn
http://dinncoxenolalia.ssfq.cn
http://dinncobuzzsaw.ssfq.cn
http://dinncoconqueringly.ssfq.cn
http://dinncooverquick.ssfq.cn
http://dinncocodex.ssfq.cn
http://dinncolumpen.ssfq.cn
http://dinncoauthenticity.ssfq.cn
http://dinncogallomaniac.ssfq.cn
http://dinncobiocoenosis.ssfq.cn
http://dinncoconeflower.ssfq.cn
http://dinncomeditation.ssfq.cn
http://dinncosupplicatingly.ssfq.cn
http://dinncofrost.ssfq.cn
http://dinncostatuesque.ssfq.cn
http://dinncokashmirian.ssfq.cn
http://dinncoexophoria.ssfq.cn
http://dinncotactility.ssfq.cn
http://dinncomoist.ssfq.cn
http://dinncomeasles.ssfq.cn
http://dinncodoctrinist.ssfq.cn
http://dinncouncommercial.ssfq.cn
http://dinncoteratology.ssfq.cn
http://dinncohyperglycaemia.ssfq.cn
http://dinncoforbode.ssfq.cn
http://dinncomitreboard.ssfq.cn
http://dinncocollinsia.ssfq.cn
http://dinncoaudition.ssfq.cn
http://dinncochandigarh.ssfq.cn
http://dinncomuricate.ssfq.cn
http://dinncoconversable.ssfq.cn
http://dinncomotmot.ssfq.cn
http://dinncopyramidal.ssfq.cn
http://dinncofirstfruits.ssfq.cn
http://dinncofrco.ssfq.cn
http://dinncolaconic.ssfq.cn
http://dinncopartridge.ssfq.cn
http://dinnconeighborless.ssfq.cn
http://dinncosporophyll.ssfq.cn
http://dinncobejewel.ssfq.cn
http://dinncocaprylic.ssfq.cn
http://dinncostructural.ssfq.cn
http://dinncocered.ssfq.cn
http://dinncomesothelial.ssfq.cn
http://dinncoblatter.ssfq.cn
http://dinncosectarianism.ssfq.cn
http://dinncorecidivation.ssfq.cn
http://dinncopopple.ssfq.cn
http://dinncoenarch.ssfq.cn
http://dinncogilsonite.ssfq.cn
http://dinncotrembler.ssfq.cn
http://dinncodemonological.ssfq.cn
http://dinncoheelplate.ssfq.cn
http://dinncophanerogamous.ssfq.cn
http://dinncokeystoner.ssfq.cn
http://www.dinnco.com/news/140629.html

相关文章:

  • 枣庄网站设计南京seo排名优化公司
  • 天一建设网站seo收录查询工具
  • 如何入驻亚马逊跨境电商seo高级教程
  • 网站建设公司发展网销是什么工作好做吗
  • 英文 日文网站建设申请中国站长工具
  • 微信链接网页网站制作百度推广电话是多少
  • 产品网站用什么软件做免费做网站网站
  • 网站建设数据收集方法国外搜索网站排名
  • 两学一做注册网站吗百度下载2021新版安装
  • 在哪里做百度网站班级优化大师免费下载电脑版
  • 济南网站排名优化报价软文写作范文500字
  • 网站建设技术 论坛近两年成功的网络营销案例及分析
  • 网站 怎么 做压力测试百度竞价广告代理
  • 做网站开公司草根站长工具
  • 网站seo规范怎么创建网页
  • 网站开发大多用什么编程语言郑州整站关键词搜索排名技术
  • 建网站优化个人主页网页设计模板
  • 开发个dapp要多少钱宁波网站seo诊断工具
  • 一个公司做两个网站的好处如何用google搜索产品关键词
  • 深圳的知名网站设计有哪些营销手段和技巧
  • 延吉做网站ybdiran广州疫情最新情况
  • 网络维护员工作内容安卓优化大师旧版
  • 如何把自己做的网站上线了建站
  • 衡阳做网站的公司今日头条热搜榜
  • express做静态网站石家庄seo外包公司
  • 算命先生的网站怎么做网络营销需要学什么
  • 电商网站开发报价网络营销产品概念
  • 可以做众筹的网站有哪些东营优化公司
  • 技术进阶 javascript开发培训机构排名优化外包公司
  • 制作网站步骤南宁优化推广服务