2. Let $m>1$, under the constraint conditions $\left\{\begin{array}{l}y \geqslant x, \\ y \leqslant m x, \\ x+y \leqslant 1\end{array}\right.$, if the maximum value of the objective function $z=x+m y$ is less than 2, then the range of the real number $m$ is
A. $(1,1+\sqrt{2})$
B. $(1+\sqrt{2},+\infty)$
C. $(1, \sqrt{2})$
D. $(3,+\infty)$
The coordinates of the three vertices of the feasible region are $A(0,0), B\left(\frac{1}{2}, \frac{1}{2}\right), C\left(\frac{1}{m+1}, \frac{m}{m+1}\right)$, thus $z_{\max }=\frac{m^{2}+1}{m+1}<2 \Rightarrow m^{2}-2 m-1<0 \Rightarrow m \in(1,1+\sqrt{2})$, so the answer is $A$.