// Path: src/main/java/com/mpalourdio/springboottemplate/model/repositories/TaskRepository.java
// @Repository
// public interface TaskRepository extends CrudRepository<Task, Integer>, CustomRepository<Task> {
// 
//     List<Task> findByTaskArchived(int taskArchivedFalse);
// 
//     List<Task> findByTaskStatus(String taskStatus);
// 
//     @Query("SELECT e FROM Task e where e.taskArchived = :status")
//     List<Task> getAllTasksByArchivedValue(@Param("status") Boolean archivedStatus);
// 
//     @Override
//     List<Task> findAll();
// }
// 
// Path: src/main/java/com/mpalourdio/springboottemplate/service/ServiceWithProperties.java
// public class ServiceWithProperties {
// 
//     private final String valueFromConfig;
// 
//     public ServiceWithProperties(String valueFromConfig) {
//         this.valueFromConfig = valueFromConfig;
//     }
// 
//     public String getValueFromConfig() {
//         return valueFromConfig;
//     }
// 
//     public void throwException() throws AnotherCustomException {
//         throw new AnotherCustomException("gosh");
//     }
// }
// 
// Path: src/main/java/com/mpalourdio/springboottemplate/service/UselessBean.java
// @Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS)
// public class UselessBean {
// 
//     private String testPro = "inclass";
// 
//     private final ABeanIWantToMockInterface aBeanIWantToMock;
// 
//     public UselessBean(ABeanIWantToMockInterface aBeanIWantToMock) {
//         this.aBeanIWantToMock = aBeanIWantToMock;
//     }
// 
//     public Boolean iWantToMockThisMethod() {
//         return aBeanIWantToMock.iAlwaysReturnFalse();
//     }
// 
//     public String getTestPro() {
//         return testPro;
//     }
// 
//     public void setTestPro(String testPro) {
//         this.testPro = testPro;
//     }
// 
//     public void testSerialization(ToSerialize toSerialize) {
//         toSerialize.prop1 = "prop1updated";
//     }
// }


import com.mpalourdio.springboottemplate.model.repositories.TaskRepository;
import com.mpalourdio.springboottemplate.service.ServiceWithProperties;
import com.mpalourdio.springboottemplate.service.UselessBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;
/*
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package com.mpalourdio.springboottemplate.controllers;


@Controller
public class HomeController {

    private static final String TASK_STATUS_ACTIVE = "ACTIVE";
    private static final String TASK_PRIORITY_MEDIUM = "MEDIUM";

    private static final String IWANTTHISINMYVIEW = "iwantthisinmyview";
    private static final String IWANTTHISINMYVIEWFROMHIBERNATE = "iwantthisinmyviewfromhibernate";

    private static final String HTTPS_JSONPLACEHOLDER_TYPICODE_COM_POSTS_1 = "https://jsonplaceholder.typicode.com/posts/1";
    private static final String HOME_INDEX = "home/index";
    private static final String NEW_BODY = "new body";

    private final ServiceWithProperties serviceWithProperties;
    private final String myProperty;
// Path: src/main/java/com/mpalourdio/springboottemplate/model/repositories/TaskRepository.java
// @Repository
// public interface TaskRepository extends CrudRepository<Task, Integer>, CustomRepository<Task> {
// 
//     List<Task> findByTaskArchived(int taskArchivedFalse);
// 
//     List<Task> findByTaskStatus(String taskStatus);
// 
//     @Query("SELECT e FROM Task e where e.taskArchived = :status")
//     List<Task> getAllTasksByArchivedValue(@Param("status") Boolean archivedStatus);
// 
//     @Override
//     List<Task> findAll();
// }
// 
// Path: src/main/java/com/mpalourdio/springboottemplate/service/ServiceWithProperties.java
// public class ServiceWithProperties {
// 
//     private final String valueFromConfig;
// 
//     public ServiceWithProperties(String valueFromConfig) {
//         this.valueFromConfig = valueFromConfig;
//     }
// 
//     public String getValueFromConfig() {
//         return valueFromConfig;
//     }
// 
//     public void throwException() throws AnotherCustomException {
//         throw new AnotherCustomException("gosh");
//     }
// }
// 
// Path: src/main/java/com/mpalourdio/springboottemplate/service/UselessBean.java
// @Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS)
// public class UselessBean {
// 
//     private String testPro = "inclass";
// 
//     private final ABeanIWantToMockInterface aBeanIWantToMock;
// 
//     public UselessBean(ABeanIWantToMockInterface aBeanIWantToMock) {
//         this.aBeanIWantToMock = aBeanIWantToMock;
//     }
// 
//     public Boolean iWantToMockThisMethod() {
//         return aBeanIWantToMock.iAlwaysReturnFalse();
//     }
// 
//     public String getTestPro() {
//         return testPro;
//     }
// 
//     public void setTestPro(String testPro) {
//         this.testPro = testPro;
//     }
// 
//     public void testSerialization(ToSerialize toSerialize) {
//         toSerialize.prop1 = "prop1updated";
//     }
// }


// Path: src/main/java/com/mpalourdio/springboottemplate/controllers/HomeController.java
import com.mpalourdio.springboottemplate.model.repositories.TaskRepository;
import com.mpalourdio.springboottemplate.service.ServiceWithProperties;
import com.mpalourdio.springboottemplate.service.UselessBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;

/*
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package com.mpalourdio.springboottemplate.controllers;


@Controller
public class HomeController {

    private static final String TASK_STATUS_ACTIVE = "ACTIVE";
    private static final String TASK_PRIORITY_MEDIUM = "MEDIUM";

    private static final String IWANTTHISINMYVIEW = "iwantthisinmyview";
    private static final String IWANTTHISINMYVIEWFROMHIBERNATE = "iwantthisinmyviewfromhibernate";

    private static final String HTTPS_JSONPLACEHOLDER_TYPICODE_COM_POSTS_1 = "https://jsonplaceholder.typicode.com/posts/1";
    private static final String HOME_INDEX = "home/index";
    private static final String NEW_BODY = "new body";

    private final ServiceWithProperties serviceWithProperties;
    private final String myProperty;
    private final UselessBean uselessBean;