摘要: 1,通过xml的方式: 2,通过bean的方式: 使用: 1,java类中获取全局变量: 2,mapper中使用全局变量: 或 阅读全文
posted @ 2018-03-21 09:37 VoctrALs 阅读(1194) 评论(0) 推荐(0) 编辑
摘要: import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @Component public class GlobalValue { // @Value("${mongodb.db}") 这种方式无法给... 阅读全文
posted @ 2018-03-21 09:31 VoctrALs 阅读(3277) 评论(0) 推荐(0) 编辑