Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Spring Scala : 스프링이 스칼라를 만났을 때
Search
Outsider
October 14, 2013
Technology
96
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Spring Scala : 스프링이 스칼라를 만났을 때
Springcamp 2013 with Scala에서 발표한 발표자료
Outsider
October 14, 2013
More Decks by Outsider
See All by Outsider
GitHub Actions의 다양한 기능 활용하기 - GitHub Universe '24 Recap
outsider
0
1.1k
당근 개발자 플랫폼은 어떤 문제를 해결하고 있는가?
outsider
1
4.5k
오픈소스에 기여할 때 알면 좋을 개발 프로세스
outsider
0
2k
DevOps를 가속화하는 플랫폼 엔지니어링
outsider
0
4.3k
클라우드 시대에 맞는 사이트 신뢰성 엔지니어
outsider
0
2k
디자인에 이어 코딩까지 AI가 프로그램 개발을 척척? : GitHub Copilot, 어디까지 알아보셨나요
outsider
0
1.9k
Citizen 개발기
outsider
0
1.2k
오픈소스 뒤에 메인테이너 있어요
outsider
0
160
오픈소스에 기여할 때 해도 되는 일과 하면 안되는 일
outsider
0
120
Other Decks in Technology
See All in Technology
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
790
Refining Active Record
shugo
0
160
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
3
1.1k
20261017福岡devIO 「AIは"良いダッシュボード"を作れるか?
jtakeda
0
170
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
880
USB PDを使ってスマホを労わりたい
raspython3
0
180
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
1
1.8k
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
4
1.2k
Metadata - Section 1: HTML Basics
mohab1
0
120
JAWS-UGグッズ職人仕事の流儀
kentapapa
0
120
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
480
Gemini Intelligence 入門 ― AppFunctions と Gemini Nano
takuroabe
0
280
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
The Limits of Empathy - UXLibs8
cassininazir
2
720
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
Navigating Weather and Climate Data
rabernat
0
560
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
940
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
760
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Transcript
4QSJOH4DBMB ݅լਸٸ झ݂ झணۄܳ 0VUTJEFS BU4QSJOH$BNQXJUI4DBMB
0VUTJEFS !0VUTJEFS PVUTJEFSJT!HNBJMDPN ٬ਸજইೞח۽Ӓېݠ ࠆल ۄझணۄ٬ױ '3&/%4١ীࢲഝز নೠӝࣿীҙब݆ IUUQCMPHPVUTJEFSOFLS࠶۽Ӓ
झணۄ۽ झ݂ۨਕܳ ࢎਊೡࣻחо ߊীࢲח
झ݂झணۄоযڃӝמਸਗೞחо पઁ۽झணۄীࢲझ݂ਸࢎਊೡٸח যڃगоחо ߊীࢲח
None
IUUQXXXGMJDLSDPNQIPUPTGBNJMZNXS ఆ۞ ਢۨਕחহ
झ݂ਸࢎਊೡࣻহਸө
4QSJOH
झ݂झணۄ IUUQTHJUIVCDPNTQSJOHQSPKFDUTTQSJOHTDBMB झணۄ۽झ݂ۨਕܳऔѱࢎਊೞب۾ W.
झணۄېझܳझ݂࠼ਵ۽োѾ झ݂మ݁ਸೣࣻഋधਵ۽ࢎਊ झணۄஸ۩࣌ਸઓࢿੑ +BWB$POGJHܳ4DBMB$POGJH झ݂झணۄ
झ݂࠼োزޙઁ
1 public class Person { 2 private String name; 3
4 public String getName() { 5 return this.name; 6 } 7 8 public void setName(String name) { 9 this.name = name; 10 } 11 }
झணۄח ߄࠼ӏডਸ ٮܰঋח
1 class Person { 2 var name:String = _ 3
}
1 class Person { 2 var name:String = _ 3
4 def name():String = name 5 def name_=(n:String) = name = n 6 }
1 public class Person { 2 private String name; 3
4 public String name() { 5 return this.name; 6 } 7 8 public void name_$eq(String name) { 9 this.name = name; 10 } 11 }
!#FBO1SPQFSUZ ೧Ѿ଼
1 import scala.beans.BeanProperty 2 3 class Person { 4 5
@BeanProperty 6 var name:String = _ 7 }
4QSJOH4DBMB ೧Ѿ଼
झ݂ #FBO*OGP'BDUPSZۚੋఠಕझࢎਊ
1 <repositories> 2 <repository> 3 <id>repository.springsource.milestone</id> 4 <name>SpringSource Milestone Repository</name>
5 <url>http://repo.springsource.org/milestone</url> 6 </repository> 7 </repositories> 8 9 <dependencies> 10 <dependency> 11 <groupId>org.springframework.scala</groupId> 12 <artifactId>spring-scala</artifactId> 13 <version>1.0.0.M2</version> 14 </dependency> 15 </dependencies>
झ݂మ݁
झ݂झணۄమ݁ ߔੋఠಕझ OVMM߈ജ ېझۄఠ ೣࣻ 0QUJPO߈ജ ېझݒפಁझ
4JNQMF+ECD5FNQMBUF +NT5FNQMBUF 3FTU5FNQMBUF 5SBOTBDUJPO5FNQMBUF
1 template.send("queue", 2 new MessageCreator() { 3 public Message createMessage(Session
session) 4 throws JMSException { 5 return session 6 .createTextMessage("Hello World"); 7 } 8 });
1 template.send("queue") { 2 session: Session => 3 session.createTextMessage("Hello World")
4 }
1 RestTemplate restTemplate = new RestTemplate(); 2 3 String result
= restTemplate 4 .getForObject( 5 "http://example.com", 6 String.class);
1 val restTemplate = new RestTemplate() 2 3 val result
= restTemplate 4 .getForAny[String] 5 ("http://example.com")
4DBMB$POGJH
9.- +BWB$POGJH
9.- +BWB$POGJH 4DBMB$POGJH
'VODUJPOBM$POGJHVSBUJPO
1 import org.springframework.scala. 2 context.function.FunctionalConfiguration 3 4 class ScalaExampleConfiguration 5
extends FunctionalConfiguration { 6 7 bean("foo") { 8 "Foo" 9 } 10 }
1 class ScalaExampleConfiguration 2 extends FunctionalConfiguration { 3 4 bean(
5 "foo", 6 aliases = Seq("bar") 7 scope = BeanDefinition.SCOPE_PROTOTYPE) { 8 "Foo" 9 } 10 }
1 class ScalaExampleConfiguration 2 extends FunctionalConfiguration { 3 4 prototype("foo")
{ 5 "Foo" 6 } 7 8 singleton("bar") { 9 "Bar" 10 } 11 }
1 class ScalaExampleConfiguration 2 extends FunctionalConfiguration { 3 4 val
conference = bean() { 5 val c = new Conference("SpringCamp") 6 c.when = "2013-10-13" 7 c.where = "ুझ" 8 c 9 } 10 11 bean("helloService") { 12 new HelloService(conference()) 13 } 14 }
'VODUJPOBM$POGJH"QQMJDBUJPO$POUFYU
1 import org.springframework.scala.context. 2! function.FunctionalConfigApplicationContext 3 4 object HelloApp extends
App { 5 val context = 6 FunctionalConfigApplicationContext[ScalaExampleConfiguration] 7 val helloService = context.getBean(classOf[HelloService]) 8 }
झ݂झணۄо ਵݶ झணۄ۽झ݂ਸ ॶࣻחо IUUQXXXGMJDLSDPNQIPUPTDIJDBHPBSUEFQBSUNFOU
झணۄ۽ झ݂۽ંܳ োزೞ۰ݶ ݆সਃೞ IUUQXXXGMJDLSDPNQIPUPTKPFTIMBCPUOJL
झ݂झணۄо೧חੌӓੌࠗ IUUQXXXGMJDLSDPNQIPUPTMFOPSFN
IUUQXXXGMJDLSDPNQIPUPTEVHTQS 4QSJOH 1FU$MJOJD http://docs.spring.io/docs/petclinic.html https://github.com/spring-projects/spring-petclinic/
.BWFO
1 <dependencies> 2 <dependency> 3 <groupId>org.scala-lang</groupId> 4 <artifactId>scala-library</artifactId> 5 <version>2.10.1</version>
6 </dependency> 7 </dependencies> झணۄۄ࠳۞ܻ୶о
TDBMBNBWFOQMVHJO ݫ࠵ীࢲझணۄஹੌ߂పझ WXJUITDBMBW
1 <plugin> 2 <groupId>net.alchim31.maven</groupId> 3 <artifactId>scala-maven-plugin</artifactId> 4 <version>3.1.6</version> 5 <executions>
6 <execution> 7 <id>scala-compile-first</id> 8 <phase>process-resources</phase> 9 <goals> 10 <goal>add-source</goal> 11 <goal>compile</goal> 12 </goals> 13 </execution> 14 <execution> 15 <id>scala-test-compile</id> 16 <phase>process-test-resources</phase> 17 <goals> 18 <goal>testCompile</goal> 19 </goals> 20 </execution> 21 <execution> 22 <phase>process-resources</phase> 23 <goals> 24 <goal>compile</goal> 25 </goals> 26 </execution> 27 </executions> 28 </plugin>
۽ંҳઑ TSD NBJO KBWB UFTU KBWB TSD NBJO KBWB UFTU
KBWB TDBMB TDBMB
झணۄېझ
1 class Pet { 2 private var name:String = _
3 4 def name():String = name 5 def name_=(n:String) = name = n 6 }
1 Pet pet = new Pet(); 2 pet.name_$eq(“Dog”); 3 String
n = pet.name();
য֢ప࣌
1 @Controller 2 @SessionAttributes("visit") 3 public class OwnerController { 4
@RequestMapping("/owners/{ownerId}") 5 public ModelAndView showOwner( 6 @PathVariable("ownerId") int ownerId) { 7 // .. 8 } 9 10 @RequestMapping( 11 value = "visits/new", 12 method = RequestMethod.GET) 13 public String initNewVisitForm() { 14 // .. 15 } 16 }
1 @Controller 2 @SessionAttributes(Array("visit")) 3 class OwnerController { 4 @RequestMapping(Array("/owners/{ownerId}"))
5 def showOwner( 6 @PathVariable("ownerId") ownerId:Int) = { 7 //.. 8 } 9 10 @RequestMapping( 11 value = Array("/visits/new"), 12 method = Array(RequestMethod.GET)) 13 def initNewVisitForm = { 14 // ... 15 } 16 }
1 @Controller 2 public class VisitController { 3 4 private
final ClinicService cs; 5 6 @Autowired 7 public VisitController(ClinicService cs) { 8 this.cs = cs; 9 } 10 }
1 @Controller 2 class VisitController @Autowired() (cs: ClinicService) { 3
}
য֢ప࣌ઓࢿয়ܨ
ஹੌद য֢ప࣌ীೠ ઓࢿਃೞ 4DBMBীࢲח೧Ѿؽ
<8"3/*/(>XBSOJOH$MBTT PSHKPEBDPOWFSU'SPN4USJOHOPUGPVOE DPOUJOVJOHXJUIBTUVC <8"3/*/(>XBSOJOH$BVHIU KBWBMBOH/VMM1PJOUFS&YDFQUJPO XIJMFQBSTJOHBOOPUBUJPOTJOKPEBUJNFKBS PSHKPEBUJNF%BUF5JNFDMBTT <&3303>FSSPSFSSPSXIJMFMPBEJOH%BUF5JNF DMBTTGJMFKPEBUJNFKBS
PSHKPEBUJNF%BUF5JNFDMBTT JTCSPLFO
1 org.joda.time.DateTime 2 3 @org.joda.convert.FromString 4 public static DateTime parse(String
s) {}
1 <dependency> 2 <groupId>org.joda</groupId> 3 <artifactId>joda-convert</artifactId> 4 <version>1.5</version> 5 </dependency>
KPEBUJNF
1 object Joda { 2 implicit 3 def dateTimeOrdering: Ordering[DateTime]
= 4 Ordering.fromLessThan(_ isBefore _) 5 } 1 import Joda._ 2 dateTimes.sorted
$PMMFDUJPOT
झணۄஸۑ࣌җ ߄ஸۑ࣌ ܰ
java.util. Collection List Map Set scala.collection.immutable. Iterable List Map Set
scala.collection.mutable. Iterable Map Set
1 import scala.collection.JavaConversions._ asJavaCollection asJavaDictionary asJavaEnumeration asJavaIterable asJavaIterator asScalaBuffer ...
ٸ۽ח ߄ېझܳ ࢎਊ
FSSPS PWFSMPBEFENFUIPEWBMVFRVFSZXJUIBMUFSOBUJWFT
য়ߡۄ٘ೞח҃ য়ߡ۽٬ػݫࢲ٘ܳഐೞח҃ ఋੑ࢚ࣘҳઑܳо҃
.PEFM"OE7JFX
1 def initFindForm( 2 model: Map[String, Object] 3 ) =
{} FSSPS PSHTQSJOHGSBNFXPSLCFBOT#FBO*OTUBOUJBUJPO&YDFQUJPO $PVMEOPUJOTUBOUJBUFCFBODMBTT <TDBMBDPMMFDUJPOJNNVUBCMF.BQ> 4QFDJGJFEDMBTTJTBOJOUFSGBDF
࠭
IUUQTHJUIVCDPNPVUTJEFSJTTQSJOHQFUDMJOJD
झணۄ۽झ݂ਸࢎਊೡࣻ झ݂חѨૐػۨਕ۽ ాೞҊաݶॶ݅೧ࠁੋ गח݅ఋੑয়ܨա߄৬ झணۄݽনܲगٜ ۨಌ۠झחѢহਵ۽गח ೧Ѿ೧ঠೠ
2VFTUJPOT IUUQXXXGMJDLSDPNQIPUPTPMJWBOEFS