File tree Expand file tree Collapse file tree
java/ru/javawebinar/topjava Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package ru .javawebinar .topjava ;
22
3+ import ru .javawebinar .topjava .model .BaseEntity ;
4+
35import static ru .javawebinar .topjava .util .MealsUtil .DEFAULT_CALORIES_PER_DAY ;
46
57public class AuthorizedUser {
6- public static int id = 1 ;
8+ public static int id = BaseEntity . START_SEQ ;
79
810 public static int id () {
911 return id ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public class MealServlet extends HttpServlet {
2929 @ Override
3030 public void init (ServletConfig config ) throws ServletException {
3131 super .init (config );
32- springContext = new ClassPathXmlApplicationContext ("spring/spring-app.xml" );
32+ springContext = new ClassPathXmlApplicationContext ("spring/spring-app.xml" , "spring/spring-db.xml" );
3333 mealController = springContext .getBean (MealRestController .class );
3434 }
3535
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ <h3>Проект <a href="https://github.com/JavaWebinar/topjava10" target="_bla
1010< form method ="post " action ="users ">
1111 < b > Meal list of </ b >
1212 < select name ="userId ">
13- < option value ="1 "> User</ option >
14- < option value ="2 "> Admin</ option >
13+ < option value ="100000 "> User</ option >
14+ < option value ="100001 "> Admin</ option >
1515 </ select >
1616 < button type ="submit "> Select</ button >
1717</ form >
You can’t perform that action at this time.
0 commit comments