application.yml配置文件

#### 整合freemarker
spring:
  freemarker:
    cache: false
    charset: UTF-8
    check-template-location: true
    content-type: text/html
    expose-request-attributes: true
    expose-session-attributes: true
    request-context-attribute: request
    suffix: .ftl
    template-loader-path:
      - classpath:/templates
  application:
    name: app-shop-portal-web

###服务注册到eureka地址(spring cloud配置)
eureka:
  client:
    service-url:
      defaultZone: http://192.168.78.130:8080/eureka

maven依赖

<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>

Last modification:September 20, 2019
如果觉得这篇技术文章对你有用,请随意赞赏