Git Product home page Git Product logo

b-spring-config-homework's Introduction

Spring Config Homework

Problem 1:读取 nested properties

使用 @ConfigurationProperties 时支持读取 List、Map 以及 Class 形式的 nested properties。

具体需要读取的 properties 已经在 src/main/resources/application.properties 中给出,请在分支 p1-starts-from-here 上继续完成剩余的代码。

期望在程序启动时,在命令行输出相应的属性和值,就像已提供的代码所完成的一样。

最终的答案请提交在一个名为p1s1的分支上,p表示 problem,s表示 solution。

Problem 2:在测试中设置 properties

请先阅读分支 p2-starts-from-here 上的代码,主要是 LevelController

现在要对 LevelController 中的 getLevel() 方法写自动化测试,使用 @SpringBootTest 进行集成测试即可。

请提供至少3种不同的方案,每种方案分别提交到单独的分支上,这些分支都需从 p2-starts-from-here 分出来,依次命名为 p2s1p2s2p2s3 即可。

b-spring-config-homework's People

Contributors

xfun68 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.