eclipse设置Spring boot pom配置文件(热部署&html依赖&json数据转换&thymeleaf 模板)

我们在新建spring boot项目需要配置一些东西,本文提供pom文件里的配置
配置位置在dependencies里面
热部署:
配置好后重启,eclipse

<!-- 热部署 -->
        <dependency>
			<groupId> org.springframework.boot</groupId>
			<artifactId> spring-boot-devtools </artifactId>
			<optional>true</optional>
         </dependency>

java 与 json 数据转换:
配置后可以使用json数据,传参等

<!-- java 与json 数据转换 -->
          <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.2.3</version>
            <classifier>jdk15</classifier>
        </dependency>

HTML视图依赖:
配置后可以创建html

<!--添加HTML视图解析依赖-->
		<dependency>    
			<groupId>org.springframework.boot</groupId>    
			<artifactId>spring-boot-starter-thymeleaf</artifactId>
		</dependency>

新建项目后必须配置:

<dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.1.10</version>
        </dependency>
        
<!-- for JPA, use hibernate-entitymanager instead of hibernate-core -->
	    <dependency>
	        <groupId>org.hibernate</groupId>
	        <artifactId>hibernate-entitymanager</artifactId>
	    </dependency>
	    <dependency>
		    <groupId>org.springframework.data</groupId>
		    <artifactId>spring-data-jpa</artifactId>
		</dependency>
		  <dependency>
		    <groupId>org.projectlombok</groupId>
		    <artifactId>lombok</artifactId>
		</dependency>
			<dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.0.1</version>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
         <!-- thymeleaf 模板  -->
	     <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值