public class EmployeeServiceImpl implements EmployeeService {
static int uniqueIndex=1000;
static int uniqueid=uniqueIndex++;
public String setEmpCode()
{
String prefixName="AWL";
return prefixName+uniqueid;
}
}
<div class="col-sm-9">
<input type="text" id="emp_code" name="emp_code" placeholder="Code"
th:field="*{emp_code}" class="form-control" th:value="${emp.emp_code}" autofocus disabled="disabled">
</div>
in emp_code incremented value get stored like AWL1000, AWL1001 , but when i restart the apache service in spring java, again Emp_code get reset to AWL1000 instead of AWL1002,
How can i keep those incremented value even after apache service restart?