File tree Expand file tree Collapse file tree
java/ru/javawebinar/topjava/web Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public class MealServlet extends HttpServlet {
2727
2828 @ Override
2929 public void init () {
30- springContext = new ClassPathXmlApplicationContext ("spring/spring-app.xml" );
30+ springContext = new ClassPathXmlApplicationContext ("spring/spring-app.xml" , "spring/spring-db.xml" );
3131 mealController = springContext .getBean (MealRestController .class );
3232 }
3333
Original file line number Diff line number Diff line change 11package ru .javawebinar .topjava .web ;
22
3+ import ru .javawebinar .topjava .model .AbstractBaseEntity ;
4+
35import static ru .javawebinar .topjava .util .MealsUtil .DEFAULT_CALORIES_PER_DAY ;
46
57public class SecurityUtil {
68
7- private static int id = 1 ;
9+ private static int id = AbstractBaseEntity . START_SEQ ;
810
911 public static int authUserId () {
1012 return id ;
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ <h3>Проект <a href="https://github.com/JavaWebinar/topjava" target="_blank
99< form method ="post " action ="users ">
1010 < b style ="font-size: large "> Meals of </ b >
1111 < select name ="userId ">
12- < option value ="1 "> User</ option >
13- < option value ="2 "> Admin</ option >
12+ < option value ="100000 "> User</ option >
13+ < option value ="100001 "> Admin</ option >
1414 </ select >
1515 < button type ="submit "> Select</ button >
1616</ form >
You can’t perform that action at this time.
0 commit comments