注釋:
@RestController 控制層
@Value("${student.details}") 注入屬性
@Autowired 注入對象(對象內包含有各個屬性)
@ConfigurationProperties(prefix = "student") 配置對象類
@Component 組件,配置對象類需添加這個注釋
多環境配置
(模板)
spring:
profiles:
#active: dev
active: prod
@RestController 控制層
@Value("${student.details}") 注入屬性
@Autowired 注入對象(對象內包含有各個屬性)
@ConfigurationProperties(prefix = "student") 配置對象類
@Component 組件,配置對象類需添加這個注釋
多環境配置
(模板)
spring:
profiles:
#active: dev
active: prod
2018-01-26
最新回答 / 慕沐2409663
首先在你的pom文件下 看你的打包是war 還是war ,然后去你相應的程序目錄下 胡里有一個target 文件,進去找到對應的jar包,前提是你用Maven 打包成功 即maven install
2018-01-25