谷歌网站入口,设计网站注意哪些问题,中国设计在线网站,wordpress如何搭建论坛1.配置maven#xff0c;自定义setting文件和仓库#xff0c;一定要用阿里云镜像地址下载依赖#xff0c;官方太坑了#xff0c;整了半天都没弄好#xff0c;原来是下载太慢文件损坏alimavencentralaliyun mavenhttp://maven.aliyun.com/nexus/content/groups/public/pom 文…1.配置maven自定义setting文件和仓库一定要用阿里云镜像地址下载依赖官方太坑了整了半天都没弄好原来是下载太慢文件损坏alimavencentralaliyun mavenhttp://maven.aliyun.com/nexus/content/groups/public/pom 文件xsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd4.0.0org.springframework.bootspring-boot-starter-parent2.2.1.RELEASEcom.exampledemo-10.0.1-SNAPSHOTdemo-1Demo project for Spring Boot1.8org.springframework.bootspring-boot-starter-weborg.springframework.bootspring-boot-starter-testtestorg.junit.vintagejunit-vintage-engineorg.springframework.bootspring-boot-maven-plugin配置yml 文件和对应实体类并注入 key1和key1主键相同老是报错yml 语法不会照着写就行了server:port: 8080emp:name: caidachunage: 27salary: 1000brithday: 1992/12/12map:key1: value1key2: value2list:- one- twoforte:name: javatime: 8package com.example.demo;import java.util.Date;import java.util.List;import java.util.Map;import org.springframework.boot.context.properties.ConfigurationProperties;import org.springframework.stereotype.Component;ComponentConfigurationProperties(prefix emp)public class Emp {private String name ;private Integer age ;private Double salary ;private Date brithday ;private Map map;private List list;private Forte forte ;测试类package com.example.demo;import org.junit.jupiter.api.Test;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.boot.test.context.SpringBootTest;SpringBootTestclass Demo1ApplicationTests {AutowiredEmp emp ;Testvoid contextLoads() {System.out.println(emp);}}