For Angular routing the routing option should have been enabled while starting new project.

  1. To define a link you need to use routerLink instead of href followed by route in other side of equals like one in app.component.html
      <ul>
        <li><a routerLink="/">Home</a></li>
        <li><a routerLink="/aboutus">About Us</a></li>
        <li><a routerLink="/services">Services</a></li>
        <li><a routerLink="/contactus">Contact Us</a></li>
      </ul>
    
  2. The list of routes needs to be defined in app-routing.module.ts. It is defined inside routes array list with path and component as key value pair like one below app-routing.module.ts
    const routes: Routes = [
      {path:'aboutus', component: AboutusComponent},
      {path:'services', component: ServicesComponent},
      {path:'contactus', component:ContactComponent}
    ];
    
  3. The path and one defined assigned to routerLink in html should be same. The component is the name of the component class which represent individual page of application
  4. If you are using absolute path then it would be /PATH which takes reference of component to be loaded form root url. If you are using relative path the it would be PATH (or) ../PATH (or) ../../PATH. Incase you are using relative path clicking the link of the same page from the page you are in should throw an error(Could not be verified)
  5. Navigating to link could be acheived by two ways
    • Using RouterLink in a tags
    • Using router navigate method in ts code
  6. routerLink always knows which route is currently loaded.router navigate method does not which route is presently loaded. So we always use activateRoute and pass relativeTo as parameter and pass relative URL as parameter

app-routing.module.ts

import { NgModule, Component } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {AboutusComponent} from './aboutus/aboutus.component';
import {ServicesComponent} from './services/services.component';
import {ContactComponent} from './contact/contact.component';


const routes: Routes = [
  {path:'aboutus', component: AboutusComponent},
  {path:'services', component: ServicesComponent},
  {path:'contactus', component:ContactComponent}
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }

app.component.html

<style>
ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #333;
}

li {
  float: left;
}

li a {
  display: block;
  color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

/* Change the link color to #111 (black) on hover */
li a:hover {
  background-color: #111;
}

.active {
  background-color: #4CAF50;
}

li {
  border-right: 1px solid #bbb;
}

li:last-child {
  border-right: none;
}
</style>
<div class="content" role="main">
  <ul>
    <li><a routerLink="/">Home</a></li>
    <li><a routerLink="/aboutus">About Us</a></li>
    <li><a routerLink="/services">Services</a></li>
    <li><a routerLink="/contactus">Contact Us</a></li>
  </ul>
</div>
<router-outlet></router-outlet>

sun security validator exception pkix path building failed
When it Happens
While doing maven build in intellij using maven tool bar. Not the build from intellij terminal which again calls command prompt

Why it Happens
Intellij has its own security store and java internally. So while doing build in case the security certificates are missing in inbuilt security keystore would result in the above error. Intellij java certificates are found in below location.Proxy certificates are not added to intellij keystore.

Fix

  1. The below should be done by running command prompt as administrator.
  2. Locate your network’s certificate: In a browser, navigate to “URL OF REPO” and then hit F12, go to certificates/security and get the top most certificate… Export it to MyCertificate.cer (base64 encoded)
  3. Navigate to security folder in intellij
    C:\Program Files\IntelliJ IDEA Community Edition 2019.3.4\jbr\lib\security
    
  4. Copy over MyCertificate.cer into the security folder
  5. Type “keytool -keystore cacerts -importcert -alias MyCertificate -file MyCertificate.cer” without quotes.
  6. Use the default password of “changeit”
  7. When prompted to trust the certificate type “yes”.Restart Intellij and try to run maven install again from maven to make sure the jars are imported

More Notes in above
We experienced this issue when a server changed their HTTPS SSL certificate, and our older version of Java did not recognize the root certificate authority (CA).

If you can access the HTTPS URL in your browser then it is possible to update Java to recognize the root CA.

In your browser, go to the HTTPS URL that Java could not access. Click on the HTTPS certificate chain (there is lock icon in the Internet Explorer, or the domain name left of the URL in firefox) and navigate the certificate hierarchy. At the top there should be a Primary Root CA. This could be missing from your java cacerts file. Note down the Issuer and Serial Number.

Type Script Command Line

//Install Typescript
>>npm install -g typescript

//Check version of Type Script
>>tsc -v

//Compile Typescript Code
//this would generate javascript file test.js
>>tsc test.ts

//Running js file
>>node test.js

Data Types in Typescript
Typescript allows to declare variable static(optional).If you use static typing then IDE will allow for type safety at compile time.

//Declaring String
let Name: String = "Mugil"; 

//Declaring Number
let Age: number = 25;

//Declaring Boolean
let Gender: boolean = true;

//Declaring Any datatype
let Street: any = 1 (or) "First" (or) true;

var is Function Scoped and let is block scoped
Using var

var foo = 123;
if (true) {
    var foo = 456;
}

console.log(foo); // 456

Using let

let foo = 123;
if (true) {
    let foo = 456;

}
console.log(foo); // 123
//Determined by Type Inference
var firstName = 'Mugil';
var age = 33;

//Determined by Annotation
var LastName: string = 'vannan';

//Not yet Determined 
var Location;

//Not yet Determined 
var Location;

var previousExp = 6 ;

//If you add a number and string it would be string irrespective of order
var totalExp = previousExp + "five";

//result in error
var Exp: number = previousExp + "five";

console.log("Total Exp - " + totalExp)

Interface

interface Person{
    name: String,
    age: number,
    pincode: any 
}

var objPerson:Person = {name: "Mugil", age:33, pincode:600018}

console.log(objPerson.pincode);

Class

class Person{
    private name: string;
    
    constructor(pname: string){
        this.name=pname;
    }    

    displayPerson(): void{
        console.log(this.name);
    }
}

var objPerson = new Person('Piggy');
objPerson.displayPerson();

Importing Namespaces and Modules

  1. Namespace are not widely used for development rather they are used internally. Modules are widely used for development
  2. In namespace you want to use would be imported using reference tag as in ArithmeticTester.ts, the one below. (Output is throwing error)
  3. When using modules the function would be directly added in module ts file as in Arithmetic.ts and referred using import in ArithmeticTester.ts
  4. Modules would be frequently used, the format would be import {FUNCTION_NAME} from ‘MODULENAME’

Namespace Example
Arithmetic.ts

namespace Arithmetic{
    export function Add(pNum1: number, pNum2: number){
        return pNum1+pNum2;
    }
}

ArithmeticTester.ts

/// <reference path="./Arithmetic.ts" />

let Sum = Arithmetic.Add(5,6);
console.log(Sum);

Modules Example
Arithmetic.ts

export function Add(pNum1: number, pNum2: number){
    return pNum1+pNum2;
}

ArithmeticTester.ts

import {Add} from './Arithmetic'

let Sum = Add(5,6);
console.log(Sum);

Output

11

Functions Example

  1. Arguments to function is optional. You can either set default value incase you are not sure about argument passed like in Add function
  2. You are still allowed to not pass any argument using ? in such case you would end up with different out put at runtime. NAN incase of number or undefined incase of string
  3. return type of function is not mandatory and its optional as in displayName function

Arithmetic.ts

//pNum2 would be considered as 0 incase only one argument is passed
function Add(pNum1: number, pNum2: number=0){
    return pNum1+pNum2;
}

function displayName(firstName: string, lastName? : string) : void{
    console.log("Her name is " + firstName + " "+ lastName); 
}
console.log(Add(5, 8));
console.log(Add(5));
displayName("Piggy");

Output

13
5
Her name is Piggy undefined

How to ensure type safety of arguments while using function
While defining function you may want to ensure the argument type passed.In such case you should declare the argument type the function accepts as one below.

In the below code you could see display name with two parameters(firstName and lastName). TypeSafety of second parameter is ensured by making it as string whereas first one could
be of anytype. If you try to pass something other than string as argument to second parameter then compiler would complain for error.

class SampleScript {
    displayName: (firstName, lastName: string) => void = function(firstName, lastName) {
        console.log("My Name is " + firstName + ' ' + lastName);
    }
}

window.onload = function () {
    var objSampleScript = new SampleScript();
    objSampleScript.displayName(101,'Vannan');
}

Output

My Name is 101 Vannan

Object Types
Object types could be function, module, class, interface and literal literals

Object Literals

 var square={h:10, width:10}
 var rectangle:Object ={h:10, width:20}

 //delcaring triangle as object literal
 var triangle:{};
 triangle={side1:10, side2:10, side3:10};

Functions as Object

var multiply = function (num: number) {
        return num * num;
};

//declaration of divide function object
var divide: Function;

divide = function (num1: number, num2: number) {
   return num1 / num2;
};

Object with variable and function

 var rectangle = {
        height:10,
        width:20,
        calculateArea: function() {
            return this.height* this.width;
        }
    };

    console.log(rectangle.calculateArea());
   var experience = {        
        sendExp: function (exp?: number) {
            if (exp < 3)
                return 'Beginner';
            else if (exp > 3 && exp < 6)
                return 'Intermediate';
            else
                return 'Fresher'; 

        }
    };

    console.log(experience.sendExp(5));
    console.log(experience.sendExp());

Output

Intermediate
Fresher

Function taking Object as parameter

var experience = {
        sendExp: function (job: { skill: String, exp?: number}) {
            if (job.exp < 3)
                return 'Beginner in ' + job.skill;
            else if (job.exp > 3 && job.exp < 6)
                return 'Intermediate in ' + job.skill;
            else
                return 'Fresher'; 

        }
    };

    console.log(experience.sendExp({ skill: 'Java' }));
    console.log(experience.sendExp({ skill: 'Java', exp: 5 }));

Output

Fresher
Intermediate in Java

Refinement
Purpose: Detail a Userstory into all that needs to be done to deliver its expected value
Time Spent 4 hrs for 2 week sprint(Includes planning)
Who Needs to attend Devops Team, PO
Optional Scrum Master

Qualities

  1. Open conversation to gather all info needed
  2. Shared Decision on task and planning
  3. Shared decision on estimation

Activities

  1. PO explains the why and what of the user stories
  2. Team defines how to build and deliver these stories
    • Identify prerequsites, dependencies and risks
    • Identify Tasks
    • Identify flow of task and planning
    • Change/Update the definition of done
  3. Team plays the planning Poker, estimates the relative amount of work in a user story

Outcome

  1. Identified Obstacles
  2. Detailed user stories that make the sprint plan
  3. Estimated user stories, ready for sprint planning

Planning
Purpose Define a sprint goal and make a plan to deliver it
Time Spent 4Hrs in 2 weeks sprint(Includes Refinement)
Who Needs to attend PO, Scrum Master, Team(Developers, Testers, Devops)
Optional NA

Qualities

  1. Commitment on sprint backlogs
  2. Clear priorities and sprint goal
  3. Shared knowledge about the sprint plan – how to deliver the stories and reach the goal

Activities

  1. Define what can be done next sprint
    • Product Owner and team set the sprint goal
    • Commit to capacity and velocity for next sprint
    • Devops team selects refined and estimated stories from the sprint backlog
  2. Define how it can be done
    • Finalize the plan to build the stories and deliver the sprint goal
    • Assign stories/tasks
    • If needed adjust the sprint backlog
    • Commit to the sprint backlog and start

Outcome

  1. Shared decision on tasks and planning
  2. Sprint goal, Sprint plan and Sprint backlog

Standup
Purpose Align activities and plan the upcoming day
Time Spent 15 min/day
Who Needs to attend Devops Team, Scrum Master
Optional PO

Qualities

  1. Focus on sprint goal
  2. Enhanced communication and collabration
  3. Fast Decision making
  4. Identified obstacles and impediments

Activities

  1. Team reports progress to each other(not to scrum master) by answering 3 questions per person
    • What did you finish yesterday?
    • What will you work on today?
    • What obstacles are in your way and do you have a help question for the team?
  2. Measuring progress towards deliverable’s
  3. Define the impediments that are outside our team’s influence and ask scrum master to help, solve and escalate those.

Outcome

  1. Updated Scrum board
  2. Updated impediment List

Review
Purpose Inspect the delivered value/items in last sprint and adapt the backlog with feedback from stakeholders
Time Spent 2 hrs for 2 week sprint
Who Needs to attend Devops team, Product owner, Scrummaster, Stakeholders
Optional NA

Qualities

  1. Focus on delivered value
  2. Done is Done(or not)
  3. Open conversation about work delivered and expectations
  4. Updated Backlog

Activities

  1. Devops team shows work being done
  2. Devops team tells how they managed difficulties
  3. Stakeholders ask questions and give feedback
  4. Productowner accepts work being done or pushes back to backlog
  5. Product owner updates and re-prioritizes the backlog
  6. Scrummaster and team share common understanding of last metrics(Burndown, velocity and happiness)

Outcome

  1. Updated Metrics
  2. Updated backlog
  3. Closed Sprint

Retrospective
Purpose Inspect what went well during sprint and adapt what can be improved
Time Spent 1.5 hrs for 2 week sprint
Who Needs to attend Team, Scrum master(Mandatory)
Optional PO

Qualities

  1. Open dialogue and all voices to be hear
  2. Focus on continuous improvement
  3. Collects facts and generate insights
  4. Move forward

Activities

  1. Set the context for safety – Share purpose and structure of the meeting
  2. Evaluate the last agreements and actions taken
  3. Gather new input on what went well and what to improve
  4. Prioritize improvements
  5. Detail the top 3 actions for next sprint

Outcome

  1. Maximum 3 actionable improvements for new sprint

Frequently Asked Questions

  1. What are basic things to be taken into consideration while taking a story for refinement (or) how you will consider a story to be Ready for refinement (or) Refinement DOR
    1. The priority of story should have been decided
    2. Supporting documents(Use case documents and confluence) for the story should be available
    3. Requirement and scope of the story should have been well defined
    4. Walk through should have been done by business analyst or product owner stating how the changed version of software product should behave and look like.
    5. Dependencies with other team would have been sorted
    6. Implementation and timeline details should be well defined
  2. What are basic things to be taken into consideration when you tell a story is done with refinement (or) (or) Refinement DOD
    1. Checklist of things that needs to be done should be added
    2. The story should have been pokered(1,2,3,5,8)
    3. All the details of the story should be clearly listed
    4. Subtask should have been created
    5. Testcase design document should be ready
    6. Dependencies and impact on devOps should have been discussed
    7. Acceptance Criteria should have been listed

NPK

  1. Nitrogen(Thazai Chathu) – Aids plant for growth, atmosphere contains 78% nitrogen but plant cannot consume directly from atmosphere. So microorganisms(punchai vagaigal) like rhizobium in soil absorbs nitrogen from atmosphere and supplies it through root. Adding urea is a form of adding nitrogen to soil artificially. To aid this happen naturally you can use Azospirillum mixed to soil during initial stages of plant growth.
  2. Phosporous(Manichathu) – Helps in flowering. Adding Phosphobacteria to soil helps breaking the phosphorus in soil so it could be absorbed by root of plants
  3. Pottasium(SambalChathu) – Found in wood ash or banana peelPtotashbacteria

Note

  • Instead of directly mixing Azospirillum and Phosphobacteria to soil add 10 grams for one grow bag along with vermicompost
  • Note the expiry date while buying. Keep it in a wet place away from sunlight to prevent micro organism to prevent perishing

Trichoderma viridi and Psuedomonas viridi – Both are for soil fixing microorganism. Should be used along with soil or can be used for seed treatment ()

Theymore Karaisal
Ingredients

  1. Buttermilk
  2. Coconutmilk

Preparation

  1. Take buttermilk and get it fermented for 4 to 5 days.
  2. Take Coconut milk and mix it with buttermilk. The ratio of fermented buttermilk and coconut milk should be 3:2 ratio or 1:1 ratio
  3. Mix both of them together and keep the mix in a warm place in a vessel with its top closed with piece of cloth for 4 to 5 days for more fermentation

Usage
Now the solution is ready for usage. Add this fermented solution 1:10 ratio to water. 100ml for 1 litre of water. Spray during flowering or when the plant begins to flower

Tomatoes

  • When you plant Tomatoes, make sure you take out of seedling tray and plant it in such a way 30 to 40 percent of Stalk is in Soil. This helps in spread of more roots and better fruit
  • Pruning of suckers should be done at a time where the suckers could be removed by hand. If you are using scissors to get rid of suckers you are late
  • Remove the Fan leaves at the bottom of the stalk
  • Add 30ml of Panchakavya or meenamilam per litre added to water for 2 weeks. Add this solution near root of plant when the plant is 3 to 4 feet from ground. This will make the stalk grow thick and adds more strength
  • Prevent too much of water and abundant sunlight.Pruning and removing the Stalk leaves will increase air flow and formation of fungus due to wet soil.
  • Try to grow as vertical as possible rather than making bushy tomato plant
    1. To get more flower – use wood ash which is rich in potash or use banana peel
    2. Once it flowers – Add 10grams phospobacteria or potashbacteria with vermicompost once plant starts flowering
    3. To avoid flower wilting – Use butter milk mixed with water. Panchakavya could be used 1 to 2 weeks after the plant starts flowering
    4. To avoid fruit burst – Add Mulching leaves to maintain uniform level of water.Water should be uniformly used for growth. non uniform or excessive watering on sudden would leave to excessive growth of fruit and burst since its skin could not keep up to phase of fruit growth.Even excessive fertilizer would result in disproportionate growth of fruit
    5. To avoid end blossom rot – Add calcium(sunambu) diluted in water to avoid blossom end rot. You can also use egg but takes a while to get
      converted to calcium
  • Panchakavya and meenamilam helps in plant growth. Spray meenamilam alone once the plant starts flowering once a week.

Flat Beans – Avarai

  • Plant beans other than summerdays. End of July or Mid August would be best time to sow seeds. The plant would flower within month and yield till end of January
  • Bury asafoetida near the roots to avoid wilting of flowers. This should be done 10 to 15 days before flowring. Once it starts flowering spray they-moore karaisla atleast twice a week. If that is not possible spray fermented buttermilk at the least.
  • Add granuels while once you see the plant is about to start flower.
  • Spray Neem oil in gap of 15 days to avoid aswini and other pests

Used to perform a release of a project with Maven.

Key goals in mvn release Plugin

  1. release:clean Clean up after a release preparation.
  2. release:prepare Prepare for a release in SCM(Source Code Management i.e. nexus).
  3. release:rollback Rollback a previous release.
  4. release:perform Perform a release from SCM.

Prerequisite
Since this plugin releases artifacts(could be JAR’s, ZIP’s WAR’s or TAR’s) into the repository we need to make sure
credentials are properly configured in settings.xml in the conf folder, Maven installation directory. Failing to do so would
end up in authorization error while running the goals in the plugin

Syntax

>>mvn release:clean release:prepare
>>mvn release:perform

How it Works

  1. Once you run release:clean it would clean the old class files just like maven clean
  2. When you run release:prepare it would read the pom.xml in the project. If you don’t have snapshot version defined you would end up with snapshot not found error since the
    plugin assumes snapshot is the one which needs to be released.
  3. Now on running release:prepare will ask for the name of the version and will change the line snapshot in pom.xml. It also does a git push of pom.xml in the remote repo
  4. When you run release:perform it will push the jar in the nexus repo so it would be available for other teams.
  5. When you are working on App-Model-0.0.1-SNAPHSOT using mvn:prepare and mvn:perform would put App-Model-0.0.1 in repo at the same time modifying pom.xml in local and git to 0.0.2-SNAPSHOT. So the dependent project needs to be updated likewise

Other know issues:
Sometime the release:perform fails because it complains tag already exists in repo. In such a case, you need to delete the tags and perform release again.
During the release, the list of files that needs to go along release would be tagged to particular version. In some cases, there would be files with the same tag name. In such case, maven-plugin complains the tag already exists.

To get the recent Tag

//Recent Tags
git describe --tags

//Latest Tags - With --abbrev=0 it should return closest annotated tag
git describe --abbrev=0

To delete the tag
git fetch is needed to get the remote tags to be displayed in local, kind of refresh

 
//To delete tag locally
git tag -d TAG_NAME  

git fetch

//To delete tag remote
git push --delete origin TAG_NAME

To get the Latest tags for different commits done across various branches

 
git describe --tags $(git rev-list --tags --max-count=1)

Why CLOUD?
SCALABILITY – The advantage of cloud is you can setup servers on demand and pay only for usage. SCALABILITY
INSTANT – Quick fix like plugins instead of long time for configuring hosting servers
MONEY – Pay for what you use.

What is SaaS, PaaS and IaaS? With examples
IAAS (Infrastructure As A Service) :
The base layer
Deals with Virtual Machines, Storage (Hard Disks), Servers, Network, Load Balancers etc
IaaS (Infrastructure as a Service), as the name suggests, provides you the computing infrastructure, physical or (quite often) virtual machines and other resources like virtual-machine disk image library, block and file-based storage, firewalls, load balancers, IP addresses, virtual local area networks etc.

Examples: Amazon EC2, Windows Azure, Rackspace, Google Compute Engine.

PAAS (Platform As A Service) :
A layer on top on PAAS
Runtimes (like java runtimes), Databases (like mySql, Oracle), Web Servers (tomcat etc)
PaaS (Platform as a Service), as the name suggests, provides you computing platforms which typically includes operating system, programming language execution environment, database, web server etc.

Examples: AWS Elastic Beanstalk, Windows Azure, Heroku, Force.com, Google App Engine, Apache Stratos.

SAAS (Software As A Service) :
A layer on top on PAAS
Applications like email (Gmail, Yahoo mail etc), Social Networking sites (Facebook etc)
While in SaaS (Software as a Service) model you are provided with access to application software often referred to as “on-demand software”. You don’t have to worry about the installation, setup and running of the application. Service provider will do that for you. You just have to pay and use it through some client.

Examples: Google Apps, Microsoft Office 365.

Pizza as a Service
null

IAAS vs SAAS vs PAAS
null

Traditional vs CloudNative Applications
TRADITIONAL APPLICATION uses sticky servers which sticks to one User – one Server. If the server goes down then transition from one to another removes the user session in the first server.

CLOUD NATIVE APPLICATION are non sticky servers.The server maintains a shared state by many ways like using
backend database or usings session stores.

What is SERVERLESS?
SERVERLESS doesnot mean no server, rather you would be using someones server.Cloud is serverless.

‘Serverless’, like many things in our space, is becoming an overloaded term.. but generally what it means is “Functionally, Our architecture does not depend on the provisioning or ongoing maintenance of a server”

The first instance that comes to mind is a single page javascript app, that uses local storage, and is stored on something like Amazon S# or Github Pages (or any static site – those are just common examples). Imagine something like a ‘todo’ or ‘getting things done’-style application that runs entirely in your browser. Your browser hits a service like S3 to download the code, and the items you store are all stored in local storage in your browser. There is no server you maintain for this.

The second instance, and is a bit more complicated (and also the one that popularized the term ‘serverless’), uses a service like AWS Lambda. Let me explain this by presenting the problem it solves:

Many times in my career I’ve solved a business problem for a client with little more than some ruby code that performed a periodic extract, transform, and load (typically written as a rake task). Once solved, I’d typically automate it with cron. Then the problem becomes ‘where do I host this thing that runs once every hour?’ For some clients, we’d set up a server in their existing infrastructure. For others, we’d set up an EC2 instance, even though it was idle 99% of the time. In either of those circumstances, there is a server that requires provisioning, patching, monitoring, updating, etc.

With Amazon Lambda, I can take that rake task and run it on their service as a pure ‘function’. I can even schedule it. No longer would that client need a piece of infrastructure for such a simple once-an-hour thing.

With ‘serverless’ there is still a server, just like with ‘cloud’ there is still a computer. There is just a level of abstraction on top of it that takes some of the environmental responsibilities for you.

Azure vs AWS?
Azure: Azure users choose Virtual Hard Disk (VHD), which is equivalent to a Machine Instance, to create a VM. VHD can be pre-configured by Microsoft, the user or a third party. The user must specify the amount of cores and memory.

Storage AWS: AWS has temporary storage that is allocated once an instance is started and destroyed when the instance is terminated. They also provide block storage (same as hard disks), that can be separate or attached to an instance. Object storage is offered with S3; and data archiving services with Glacier. Fully supports relational and NoSQL databases and Big Data.

Support Plans AWS: Pricing is based on a sliding scale tied to monthly usage, so your bill could potentially be quite high if you’re a heavy user.

Azure: Users are billed a flat monthly rate.

There are 3 ways to supply argument to Cloud app

  1. Command Line during app startup
  2. using gradle.build
  3. manifest.yml

How to supply Argument to Spring Controller during application startup in Gradle Wrapper

gradlew bootRun --args='--welcome.message=Mugil'

WelcomeController.java
In the below code welcomeMsg variable is assigned value during application startup. In similar ways environment variables could be setup
by supplying arguments as parameters while executing gradlew bootrun

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WelcomeController {
    public String welcomeMsg;

    @Autowired
    public WelcomeController(@Value("${welcome.message}") String message) {
        welcomeMsg = message;
    }

    @GetMapping("/")
    public String sayHello() {
        return welcomeMsg;
    }
}

How to supply Argument to Spring Controller using gradle.build
build.gradle

.
.
.
bootRun.environment([
        "WELCOME_MESSAGE": "A welcome message",
])

test.environment([
        "WELCOME_MESSAGE": "Hello from test"
])

supply Arguments using manifest.yml
(works only in cloud env since manifest.yml is way of supplying argument from app to cloud env)

---
applications:
  - name: pal-tracker
    path: build/libs/pal-tracker.jar
    random-route: true
    env:
      WELCOME_MESSAGE: Hello from Cloud Foundry
      JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 11.+ } }'